def pos

bend-collections-laws-crypto@1.0.0.0 · proofs/crypto/poly1305/value.bend:218

import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/poly1305/value.bend as Value
import Base
import bend-collections-laws-crypto@1.0.0.0/spec/lib/common.bend as C

218# y at limb position n: y * 2^(8n)
219def pos(n: Nat, +y: Nat) -> Nat:
220  match n:
221    case 0n: y
222    case 1n+k: C.shift(8n, pos(k, y))

Uses (2)

Used by (19)