def iter_valid

bend-collections@1.0.0.0 · src/containers/balanced_search_tree.bend:1222

import bend-collections@1.0.0.0/src/containers/balanced_search_tree.bend as BalancedSearchTree
import Base
import bend-collections@1.0.0.0/src/containers/dynamic_array.bend as D

1222def iter_valid(~K: Data, ~V: Data, ~cmp: K -> K -> Cmp, +n: Nat, +root: Nat, +lo: Nat, +hi: Nat, +free: Nat, payloads: D.DynArray<&2, Maybe<&2, V>>, nodes: NodeStore<K>, +i: Nat, +current: Nat, lower: Bound<K>, upper: Bound<K>, +forward: Bool, entry: Entry<K, V>, +valid: Bool) -> Cursor<K, V, cmp> & Maybe<&2, Entry<K, V>>:
1223  match valid:
1224    case True{}:
1225      iter_link(~K, ~V, ~cmp, n, root, lo, hi, free, payloads, i, lower, upper, forward, entry, ns_parent_at(~K, nodes, i))
1226    case False{}:
1227      (Cursor{TM{n, root, lo, hi, free, nodes, payloads}, 0n, current, lower, upper, forward}, None{})

Uses (14)

Used by (1)