Field.pow_ones: def of bend-collections@1.0.0.0 Import: import bend-collections@1.0.0.0/src/crypto/curve25519/field.bend as Field Lines 215-225 of bend-collections@1.0.0.0/src/crypto/curve25519/field.bend: https://jend.leeeet.dev/read.txt?path=bend-collections@1.0.0.0/src/crypto/curve25519/field.bend&start_line=215&end_line=225 import Base # acc^(2^n) * x^(2^n - 1): n steps of acc = acc^2 * x def pow_ones(+x: List<&2, U32>, n: Nat, acc: List<&2, U32>) -> List<&2, U32>: match x: case Nil{}: acc case Con{h, t}: match n: case 0n: acc case 1n+m: pow_ones(x, m, mul(sq(acc), x)) Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/curve25519/field.bend&name=mul https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/curve25519/field.bend&name=sq