def pow
import bend-collections@1.0.0.0/src/crypto/secp256k1/scalar.bend as Scalarimport Base
72# x is looked at first, so that on an unknown x nothing is unfolded
73def pow(x: List<&2, Nat>, bits: List<&2, Nat>, +acc: List<&2, Nat>) -> List<&2, Nat>:
74 match x:
75 case Nil{}: pow_go(Nil{}, bits, acc)
76 case +y <> +t: pow_go(y <> t, bits, acc)