LAWS.bounded: def of bend-kit-collections@0.1.4.1 Import: import bend-kit-collections@0.1.4.1/LAWS.bend as LAWS Lines 122-133 of bend-kit-collections@0.1.4.1/LAWS.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-collections@0.1.4.1/LAWS.bend&start_line=122&end_line=133 import Base import bend-kit-collections@0.1.4.1/omap.bend as O # Every key of m lies strictly between the bounds, in search-tree order. def bounded( ~K: Data, ~V: Data, ~cmp: K -> K -> Cmp, m: O.OMap, +lb: Maybe<&2, K>, +ub: Maybe<&2, K> ) -> Bool: match m: case O.OTip{}: True{} case O.OBin{s, +k, v, lo, hi}: above(~K, ~cmp, lb, k) && below(~K, ~cmp, ub, k) && bounded(~K, ~V, ~cmp, lo, lb, Some{k}) && bounded(~K, ~V, ~cmp, hi, Some{k}, ub) 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=Bool.and 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=bend-kit-collections@0.1.4.1/LAWS.bend&name=above https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/LAWS.bend&name=below https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/omap.bend&name=OMap