def idx.near
import bolt@1.27.0.0/src/lsp/semantic.bend as Semanticimport Base
161# the half of a node a bit goes down, empty elsewhere
162def idx.near(bb: Bool, ii: Index) -> Index:
163 match ii:
164 case INone{}:
165 INone{}
166 case ILeaf{_es}:
167 INone{}
168 case INode{lo, hi}:
169 Bool.pick(Index, bb, lo, hi)