def bsearch.find

bend-osdev-algo@0.1.0.0 · bsearch.bend:65

import bend-osdev-algo@0.1.0.0/bsearch.bend as Bsearch
import 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)

Uses (7)

Used by (11)