BalancedSearchTree.bounds_valid: 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 604-617 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=604&end_line=617 import Base def bounds_valid(~K: Data, ~V: Data, ~cmp: K -> K -> Cmp, lower: Bound, upper: Bound) -> Bool: match lower upper: case Unbounded{} _: True{} case _ Unbounded{}: True{} case Inclusive{lo} Inclusive{hi}: ordering_ok(cmp(lo, hi), True{}) case Inclusive{lo} Exclusive{hi}: ordering_ok(cmp(lo, hi), True{}) case Exclusive{lo} Inclusive{hi}: ordering_ok(cmp(lo, hi), True{}) case Exclusive{lo} Exclusive{hi}: ordering_ok(cmp(lo, hi), True{}) Uses (4): 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=bend-collections@1.0.0.0/src/containers/balanced_search_tree.bend&name=Bound https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/balanced_search_tree.bend&name=ordering_ok