BalancedSearchTree.nav_fast: def of bend-collections@1.0.0.0 Import: import bend-collections@1.0.0.0/src/containers/balanced_search_tree.bend as BalancedSearchTree Lines 1019-1030 of bend-collections@1.0.0.0/src/containers/balanced_search_tree.bend: https://jend.leeeet.dev/read.txt?path=bend-collections@1.0.0.0/src/containers/balanced_search_tree.bend&start_line=1019&end_line=1030 import Base def nav_fast(~K: Data, ~V: Data, ~cmp: K -> K -> Cmp, +fuel: Nat, +k: K, +higher: Bool, +best: Nat, st: NodeStore & (Nat & Maybe<&2, Cmp>)) -> NodeStore & NavEnd: match fuel st: case 0n Tuple{nodes, x}: (nodes, NavBest{best}) case 1n+f Tuple{nodes, Tuple{id, None{}}}: (nodes, NavBest{best}) case 1n+f Tuple{nodes, Tuple{+id, Some{LT{}}}}: nav_fast(~K, ~V, ~cmp, f, k, higher, pick(Nat, higher, id, best), search_down(~K, ~V, ~cmp, nodes, id, True{}, k)) case 1n+f Tuple{nodes, Tuple{+id, Some{GT{}}}}: nav_fast(~K, ~V, ~cmp, f, k, higher, pick(Nat, higher, best, id), search_down(~K, ~V, ~cmp, nodes, id, False{}, k)) case 1n+f Tuple{nodes, Tuple{+id, Some{EQ{}}}}: (nodes, NavEqual{id}) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Cmp https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/balanced_search_tree.bend&name=NavEnd https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/balanced_search_tree.bend&name=NodeStore https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/balanced_search_tree.bend&name=pick https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/balanced_search_tree.bend&name=search_down