def nonzero

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

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

190# OR of all limbs being nonzero, without an early exit
191def nonzero(xs: List<&2, Nat>, acc: Nat) -> Nat:
192  match xs:
193    case Nil{}: acc
194    case x <> t: nonzero(t, Nat.add(acc, x))

Uses (3)

Used by (1)