Memory.rd: def of bend-collections-laws-crypto@1.0.0.0 Import: import bend-collections-laws-crypto@1.0.0.0/src/crypto/argon2/memory.bend as Memory Lines 11-18 of bend-collections-laws-crypto@1.0.0.0/src/crypto/argon2/memory.bend: https://jend.leeeet.dev/read.txt?path=bend-collections-laws-crypto@1.0.0.0/src/crypto/argon2/memory.bend&start_line=11&end_line=18 import Base # Words i - n .. i, prepended to acc: pair holds the memory and word i. def rd(n: Nat, +i: Nat, acc: List<&2, U32>, pair: Array & U32) -> Array & List<&2, U32>: match n pair: case 0n Tuple{a, w}: (a, w <> acc) case 1n+p Tuple{a, w}: +j = Nat.sub(i, 1n) rd(p, j, w <> acc, Array.get(U32, a, U32.from_nat(j))) Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array.get 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.sub https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.from_nat