def add

bend-collections-laws-crypto@1.0.0.0 · src/crypto/poly1305/limbs.bend:25

import bend-collections-laws-crypto@1.0.0.0/src/crypto/poly1305/limbs.bend as Limbs
import Base

25# Limb-wise sum (the shorter list is padded with zeros), no carries.
26def add(a: List<&2, U32>, b: List<&2, U32>) -> List<&2, U32>:
27  match a b:
28    case Nil{} _: b
29    case x <> at Nil{}: x <> at
30    case x <> at y <> bt: U32.add(x, y) <> add(at, bt)

Uses (3)

Used by (20)