def bitseq.at
import bend-osdev-algo@0.1.0.0/bitmap.bend as Bitmapimport Base
11# bit i (False past the end)
12def bitseq.at(bs: List<&2, Bool>, i: Nat) -> Bool:
13 match bs i:
14 case Nil{} _:
15 False{}
16 case Con{h, t} 0n:
17 h
18 case Con{h, t} 1n+j:
19 bitseq.at(t, j)