LAWS.weight_balanced: def of bend-kit-collections@0.1.4.1 Import: import bend-kit-collections@0.1.4.1/LAWS.bend as LAWS Lines 267-273 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=267&end_line=273 import Base import bend-kit-collections@0.1.4.1/omap.bend as O def weight_balanced(-K: Data, -V: Data, m: O.OMap) -> Bool: match m: case O.OTip{}: True{} case O.OBin{s, k, v, +lo, +hi}: weight_ok(omap_weight(K, V, lo), omap_weight(K, V, hi)) && weight_balanced(K, V, lo) && weight_balanced(K, V, hi) Uses (5): 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=bend-kit-collections@0.1.4.1/LAWS.bend&name=omap_weight https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/LAWS.bend&name=weight_ok https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/omap.bend&name=OMap