BalancedSearchTree.attach_side: 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 870-877 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=870&end_line=877 import Base def attach_side(~K: Data, ~V: Data, ~cmp: K -> K -> Cmp, m: TreeMap, +p: Nat, +x: Nat, +on_left: Bool) -> TreeMap: match p on_left: case 0n _: set_root(~K, ~V, ~cmp, m, x) case 1n+q True{}: set_left(~K, ~V, ~cmp, m, 1n+q, x) case 1n+q False{}: set_right(~K, ~V, ~cmp, m, 1n+q, x) Uses (7): 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=Nat https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/balanced_search_tree.bend&name=TreeMap https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/balanced_search_tree.bend&name=set_left https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/balanced_search_tree.bend&name=set_right https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/balanced_search_tree.bend&name=set_root