def mul

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

import bend-collections@1.0.0.0/src/crypto/poly1305/limbs.bend as Limbs
import 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))

Uses (4)

Used by (1)