Caps.CapBits.to_list: def of bend-osdev-caps@0.1.0.0 Import: import bend-osdev-caps@0.1.0.0/caps.bend as Caps Lines 240-250 of bend-osdev-caps@0.1.0.0/caps.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-caps@0.1.0.0/caps.bend&start_line=240&end_line=250 import Base # the capabilities in s, in increasing order, numbered from k def CapBits.to_list(n: Nat, s: Word(n), +k: U32) -> List<&2, U32>: match n: case 0n: Nil{} case 1n+p: match s: case WCon{True{}, t}: Con{k, CapBits.to_list(p, t, U32.add(k, 1))} case WCon{False{}, t}: CapBits.to_list(p, t, U32.add(k, 1)) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word.Con