def bits

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

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

219# all bits of a limb list, most significant first (16 per limb)
220def bits(xs: List<&2, Nat>) -> List<&2, Nat>:
221  match xs:
222    case Nil{}: Nil{}
223    case x <> t: List.append(&2, Nat, bits(t), bits_of(16n, x))

Uses (4)

Used by (3)