BendCollections.gather: def of bend-collections@1.0.0.0 Import: import bend-collections@1.0.0.0/spec/crypto/keccak/main.bend as BendCollections Lines 47-52 of bend-collections@1.0.0.0/spec/crypto/keccak/main.bend: https://jend.leeeet.dev/read.txt?path=bend-collections@1.0.0.0/spec/crypto/keccak/main.bend&start_line=47&end_line=52 import Base import bend-collections@1.0.0.0/src/crypto/keccak/types.bend as T import bend-collections@1.0.0.0/spec/crypto/keccak/permutation.bend as F def gather(+round_count: Nat, n: Nat, +base: U32, +next: U32, +padding: Bool, +remain: Nat, s: T.State, acc: List<&2,U32>, pair: Array & U32) -> Array & T.State: match n pair: case 0n Tuple{a,w}: (a,F.rounds(round_count,0n,inject(s,prepare(padding,List.reverse(&2,U32,w <> acc),remain)))) case 1n+p Tuple{a,w}: gather(round_count,p,base,U32.inc(next),padding,remain,s,w <> acc,Array.get(U32,a,U32.add(base,next))) Uses (15): 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=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.reverse https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat 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.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.inc https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/spec/crypto/keccak/main.bend&name=inject https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/spec/crypto/keccak/main.bend&name=prepare https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/spec/crypto/keccak/permutation.bend&name=rounds https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/keccak/types.bend&name=State