def bsearch.find
import bend-osdev-algo@0.1.0.0/bsearch.bend as Bsearchimport Base
65# an index of a sorted list that holds key (the first), or None
66def bsearch.find(+xs: List<&2, U32>, +key: U32) -> Maybe<&2, Nat>:
67 +i = bsearch.lower_bound(xs, key)
68 bsearch.find.check(i, List.get(&2, U32, xs, i), key)