def horner
import bend-collections@1.0.0.0/src/crypto/secp256k1/limbs.bend as Limbsimport Base
90# the value of the limbs (only ever of an empty list at run time: see carry)
91def horner(xs: List<&2, Nat>) -> Nat:
92 match xs:
93 case Nil{}: 0n
94 case x <> t: Nat.add(Nat.mul(Nat.mul(horner(t), 256n), 256n), x)