def mul
import bend-collections@1.0.0.0/src/crypto/poly1305/limbs.bend as Limbsimport Base
38# Schoolbook product, no carries: x r0 + 2^8 (x r1 + 2^8 (...)).
39def mul(+x: List<&2, U32>, r: List<&2, U32>) -> List<&2, U32>:
40 match r:
41 case Nil{}: Nil{}
42 case r0 <> rs: add(scale(r0, x), 0 <> mul(x, rs))