Caps.CapBits.has: def of bend-osdev-caps@0.1.0.0 Import: import bend-osdev-caps@0.1.0.0/caps.bend as Caps Lines 228-238 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=228&end_line=238 import Base # whether capability k is in s def CapBits.has(n: Nat, s: Word(n), k: Nat) -> Bool: match n: case 0n: False{} case 1n+p: match s k: case WCon{h, t} 0n: h case WCon{h, t} 1n+j: CapBits.has(p, t, j) Uses (4): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat 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