def get_if
import bend-collections@1.0.0.0/src/containers/bitset.bend as Bitsetimport Base
import bend-collections@1.0.0.0/src/containers/types/bitset.bend as E
202def get_if(ok: Bool, +n: Nat, +d: Nat, a: Array<Wd>, +i: Nat) -> Bitset & Result<&2, &2, E.Error, Bool>:
203 match ok:
204 case True{}:
205 get_read(read(a, d, wordix(i)), n, d, bitix(i))
206 case False{}:
207 (BS{n, d, a}, Fail{E.IndexOutOfRange{}})