Crdt.KCounter.get: def of bend-kit-crdt@0.2.0.0 Import: import bend-kit-crdt@0.2.0.0/crdt.bend as Crdt Lines 233-239 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=233&end_line=239 import Base # The count of replica k: the largest count under an ID that cmp makes equal to k. def KCounter.get(~K: Data, ~cmp: K -> K -> Cmp, s: KCounter, +k: K) -> U32: match s: case KNil{}: 0 case KCon{id, c, r}: U32.max(KCounter.hit(cmp(k, id), c), KCounter.get(~K, ~cmp, r, k)) Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Cmp 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 https://jend.leeeet.dev/definition.txt?path=bend-kit-crdt@0.2.0.0/crdt.bend&name=KCounter https://jend.leeeet.dev/definition.txt?path=bend-kit-crdt@0.2.0.0/crdt.bend&name=KCounter.hit