def bits_go

bend-collections@1.0.0.0 · spec/crypto/secp256k1/curve.bend:130

import bend-collections@1.0.0.0/spec/crypto/secp256k1/curve.bend as Curve
import Base

130# bits i - 1, ..., 0 of k, most significant first (k is looked at first,
131# so that on an unknown k nothing is unfolded)
132def bits_go(i: Nat, +k: Nat) -> List<&2, Nat>:
133  match i:
134    case 0n: Nil{}
135    case 1n+ +j: bit(j, k) <> bits_go(j, k)

Uses (3)

Used by (1)