Field.digits: def of bend-collections-laws-crypto@1.0.0.0 Import: import bend-collections-laws-crypto@1.0.0.0/spec/crypto/curve25519/field.bend as Field Lines 60-68 of bend-collections-laws-crypto@1.0.0.0/spec/crypto/curve25519/field.bend: https://jend.leeeet.dev/read.txt?path=bend-collections-laws-crypto@1.0.0.0/spec/crypto/curve25519/field.bend&start_line=60&end_line=68 import Base import bend-collections-laws-crypto@1.0.0.0/spec/lib/common.bend as C # a constant from its little-endian base-256 digits, each scaled by the # symbolic one (so the checker never unfolds it): digits(one, [65n, 219n, 1n]) # is 121665 for one == 1 def digits(+one: Nat, ds: List<&2, Nat>) -> Nat: match ds: case Nil{}: 0n case Con{d, dt}: Nat.add(Nat.mul(one, d), C.shift(8n, digits(one, dt))) 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=Nat.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.mul https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/spec/lib/common.bend&name=shift