Crdt.GCounter.le: def of bend-kit-crdt@0.2.0.0 Import: import bend-kit-crdt@0.2.0.0/crdt.bend as Crdt Lines 96-104 of bend-kit-crdt@0.2.0.0/crdt.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-crdt@0.2.0.0/crdt.bend&start_line=96&end_line=104 import Base # True when a is at most b in every entry. def GCounter.le(a: List<&2, U32>, b: List<&2, U32>) -> Bool: match a b: case Nil{} _: True{} case Con{x, xs} Nil{}: Bool.and(U32.is_eq(x, 0), GCounter.le(xs, Nil{})) case Con{x, xs} Con{y, ys}: Bool.and(U32.is_le(x, y), GCounter.le(xs, ys)) Uses (6): 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=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_le