def size.obj

bend-kit-cbor@0.3.0.0 · cbor.bend:263

import bend-kit-cbor@0.3.0.0/cbor.bend as Cbor
import Base

263def size.obj(k: Val, v: Val, r: Val & Nat) -> Val & Nat:
264  (t, n) = r
265  match t:
266    case Obj{items}:
267      (Obj{Con{(k, v), items}}, n)
268    case _:
269      (Obj{Nil{}}, n)

Uses (5)

Used by (1)