def KCounter.merge

bend-kit-crdt@0.2.0.0 · crdt.bend:255

import bend-kit-crdt@0.2.0.0/crdt.bend as Crdt
import Base

255# The union of two ID-sorted states, with the maximum count where IDs are equal.
256def KCounter.merge(~K: Data, ~cmp: K -> K -> Cmp, +a: KCounter<K>, +b: KCounter<K>) -> KCounter<K>:
257  KCounter.merge.go(~K, ~cmp, a, b, KCounter.heads(~K, ~cmp, a, b))

Uses (4)

Used by (1)