def g_rot_hi

bend-kit-collections@0.1.4.1 · LAWS.bend:295

import bend-kit-collections@0.1.4.1/LAWS.bend as LAWS
import Base
import bend-kit-collections@0.1.4.1/omap.bend as O

295def g_rot_hi(-K: Data, -V: Data, k: K, v: V, lo: O.OMap<K, V>, hi: O.OMap<K, V>) -> O.OMap<K, V>:
296  match lo:
297    case O.OTip{}:
298      O.OMap.bin(K, V, k, v, O.OTip{}, hi)
299    case O.OBin{s, lk, lv, +ll, +lh}:
300      O.OMap.rot_hi.pick(K, V,
301        Nat.is_lt(omap_weight(K, V, lh), Nat.mul(2n, omap_weight(K, V, ll))),
302        k, v, lk, lv, ll, lh, hi)

Uses (6)

Used by (3)