BalancedSearchTree.remove_if_value: 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 1796-1801 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=1796&end_line=1801 import Base def remove_if_value(~K: Data, ~V: Data, ~cmp: K -> K -> Cmp, ~eq: V -> V -> Bool, +id: Nat, +expected: V, +replacement: V, r: TreeMap & Maybe<&2, V>) -> TreeMap & Bool: match r: case Tuple{m, None{}}: (m, False{}) case Tuple{m, Some{old}}: remove_if_apply(~K, ~V, ~cmp, m, id, replacement, eq(old, expected)) Uses (8): 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=TreeMap https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/balanced_search_tree.bend&name=remove_if_apply