def add

bend-collections@1.0.0.0 · src/crypto/secp256k1/limbs.bend:59

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

59# limb-wise sum; the longer tail is kept
60def add(xs: List<&2, Nat>, ys: List<&2, Nat>) -> List<&2, Nat>:
61  match xs ys:
62    case Nil{} _: ys
63    case x <> xt Nil{}: x <> xt
64    case x <> xt y <> yt: Nat.add(x, y) <> add(xt, yt)

Uses (3)

Used by (8)