def KCounter.head

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

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

208# cmp(x, first ID of b), or EQ when b is empty.
209def KCounter.head(~K: Data, ~cmp: K -> K -> Cmp, +x: K, b: KCounter<K>) -> Cmp:
210  match b:
211    case KNil{}:
212      EQ{}
213    case KCon{y, d, t}:
214      cmp(x, y)

Uses (2)

Used by (4)