def count

bend-toon-codec@0.1.0.0 · src/step.bend:23

import bend-toon-codec@0.1.0.0/src/step.bend as Step
import Base
import bend-toon-codec@0.1.0.0/src/json.bend as J

23def count(+xs: J.Json) -> U32:
24  match xs:
25    case J.JCons{h, t}:
26      (1 + count(t) : U32)
27    case _:
28      0

Uses (3)

Used by (2)