def sum_all

bend-collections-laws-crypto@1.0.0.0 · src/crypto/curve25519/field.bend:291

import bend-collections-laws-crypto@1.0.0.0/src/crypto/curve25519/field.bend as Field
import Base

291# the sum of the limbs (below 2^13 for 32 bytes); no early exit
292def sum_all(xs: List<&2, U32>, acc: U32) -> U32:
293  match xs:
294    case Nil{}:
295      acc
296    case Con{x, xt}:
297      sum_all(xt, U32.add(acc, x))

Uses (3)

Used by (6)