def len64
import bend-collections-laws-crypto@1.0.0.0/src/math/random/rand.bend as Randimport Base
import bend-collections-laws-crypto@1.0.0.0/src/math/u64.bend as W
import bend-collections-laws-crypto@1.0.0.0/src/math/w64.bend as X
285# the length as a 64-bit word
286def len64(-A: Data, xs: List<&2, A>) -> W.U64:
287 match xs:
288 case Nil{}:
289 W.U64{0, 0}
290 case Con{x, rest}:
291 X.add(len64(A, rest), W.U64{1, 0})