Omap.OMap.balance: def of bend-kit-collections@0.1.4.1 Import: import bend-kit-collections@0.1.4.1/omap.bend as Omap Lines 121-128 of bend-kit-collections@0.1.4.1/omap.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-collections@0.1.4.1/omap.bend&start_line=121&end_line=128 import Base # A node whose sides were balanced before one insertion or deletion. def OMap.balance( -K: Data, -V: Data, k: K, v: V, +lo: OMap, +hi: OMap ) -> OMap: +wl = (OMap.size(K, V, lo) + 1 : U32) +wh = (OMap.size(K, V, hi) + 1 : U32) OMap.balance.if(K, V, U32.is_gt(wh, (3 * wl : U32)), U32.is_gt(wl, (3 * wh : U32)), k, v, lo, hi) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_gt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.mul https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/omap.bend&name=OMap https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/omap.bend&name=OMap.balance.if https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/omap.bend&name=OMap.size