def bsearch.array.step
import bend-osdev-algo@0.1.0.0/bsearch.bend as Bsearchimport Base
92def bsearch.array.step(active: Bool, r: Array<U32> & U32, +key: U32, +lo: U32, +hi: U32, +mid: U32) -> BsearchState:
93 match active:
94 case True{}:
95 (a, +x) = r
96 bsearch.array.pick(U32.is_lt(x, key), a, lo, hi, mid)
97 case False{}:
98 (a, x) = r
99 BsearchState{a, lo, hi}