def KCounter.le
import bend-kit-crdt@0.2.0.0/crdt.bend as Crdtimport Base
309# True when each count in a is at most the count of its ID in b.
310def KCounter.le(~K: Data, ~cmp: K -> K -> Cmp, a: KCounter<K>, +b: KCounter<K>) -> Bool:
311 match a:
312 case KNil{}:
313 True{}
314 case KCon{x, c, r}:
315 Bool.and(U32.is_le(c, KCounter.get(~K, ~cmp, b, x)), KCounter.le(~K, ~cmp, r, b))
Uses (6)
Used by (0)
No other definition uses this definition.