def add
import bend-collections@1.0.0.0/src/crypto/secp256k1/limbs.bend as Limbsimport 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)