def run_go

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

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

44# run a program: each instruction appends its result as a new register
45def run_go(+p: Nat, prog: List<&2, SOp>, +regs: List<&2, Nat>) -> List<&2, Nat>:
46  match prog:
47    case Nil{}: regs
48    case op <> t: run_go(p, t, List.append(&2, Nat, regs, [exec(p, op, regs)]))

Uses (5)

Used by (4)