def GCounter.le
import bend-kit-crdt@0.2.0.0/crdt.bend as Crdtimport Base
96# True when a is at most b in every entry.
97def GCounter.le(a: List<&2, U32>, b: List<&2, U32>) -> Bool:
98 match a b:
99 case Nil{} _:
100 True{}
101 case Con{x, xs} Nil{}:
102 Bool.and(U32.is_eq(x, 0), GCounter.le(xs, Nil{}))
103 case Con{x, xs} Con{y, ys}:
104 Bool.and(U32.is_le(x, y), GCounter.le(xs, ys))
Uses (6)
Used by (0)
No other definition uses this definition.