BalancedSearchTree.put_allocated: 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 1653-1658 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=1653&end_line=1658 import Base def put_allocated(~K: Data, ~V: Data, ~cmp: K -> K -> Cmp, +p: Nat, +on_left: Bool, r: TreeMap & Result<&2, &2, Rejected, Nat>) -> TreeMap & Result<&2, &2, Rejected, Maybe<&2, V>>: match r: case Tuple{m, Done{+id}}: (insert_fixed(~K, ~V, ~cmp, id, size(~K, ~V, ~cmp, insert_header(~K, ~V, ~cmp, attach(~K, ~V, ~cmp, m, p, id, on_left), id, p, on_left))), Done{None{}}) case Tuple{m, Fail{e}}: (m, Fail{e}) Uses (13): 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=Result 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=Rejected 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=attach https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/balanced_search_tree.bend&name=insert_fixed https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/balanced_search_tree.bend&name=insert_header https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/balanced_search_tree.bend&name=size