def count

bend-kit-bits@0.1.0.1 · bits.bend:207

import bend-kit-bits@0.1.0.1/bits.bend as Bits
import Base

207def count(xs: List<&2, Code>, c: Array<U32>) -> Array<U32>:
208  match xs:
209    case Nil{}:
210      c
211    case Con{Code{sym, +len}, t}:
212      count(t, count.if(U32.is_eq(len, 0), c, len))

Uses (6)

Used by (1)