def KCounter.heads
import bend-kit-crdt@0.2.0.0/crdt.bend as Crdtimport Base
216# The comparison of the first IDs of a and b, or EQ when either is empty.
217def KCounter.heads(~K: Data, ~cmp: K -> K -> Cmp, a: KCounter<K>, b: KCounter<K>) -> Cmp:
218 match a:
219 case KNil{}:
220 EQ{}
221 case KCon{x, c, r}:
222 KCounter.head(~K, ~cmp, x, b)