Crdt.GCounter.merge: def of bend-kit-crdt@0.2.0.0 Import: import bend-kit-crdt@0.2.0.0/crdt.bend as Crdt Lines 25-35 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=25&end_line=35 import Base # Component-wise maximum. It is commutative, associative, and idempotent. def GCounter.merge(a: List<&2, U32>, b: List<&2, U32>) -> List<&2, U32>: match a b: case Nil{} Nil{}: Nil{} case Nil{} Con{y, ys}: Con{y, ys} case Con{x, xs} Nil{}: Con{x, xs} case Con{x, xs} Con{y, ys}: Con{U32.max(x, y), GCounter.merge(xs, ys)} Uses (3): 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.max