BendCollections.pad: def of bend-collections@1.0.0.0 Import: import bend-collections@1.0.0.0/spec/crypto/keccak/main.bend as BendCollections Lines 30-34 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=30&end_line=34 import Base def pad(ws: List<&2,U32>, +pos: Nat, +remain: Nat) -> List<&2,U32>: match ws: case Nil{}: Nil{} case w <> rest: last_bit(tail_word(w,pos,remain),Nat.is_eq(pos,132n)) <> pad(rest,Nat.add(pos,4n),remain) Uses (7): 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.is_eq 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/spec/crypto/keccak/main.bend&name=last_bit https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/spec/crypto/keccak/main.bend&name=tail_word