Octets.cr.oct.pieces.go: def of bend-osdev-crypto@0.1.0.0 Import: import bend-osdev-crypto@0.1.0.0/octets.bend as Octets Lines 76-85 of bend-osdev-crypto@0.1.0.0/octets.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-crypto@0.1.0.0/octets.bend&start_line=76&end_line=85 import Base # the pieces of xs, last first: whole n-byte pieces, then what is left # (cur: the piece being filled, reversed, i bytes long) def cr.oct.pieces.go(xs: List<&2, U32>, +n: Nat, +i: Nat, +cur: List<&2, U32>, acc: List<&2, List<&2, U32>>) -> List<&2, List<&2, U32>>: match xs: case Nil{}: cr.oct.flush(cur, acc) case Con{x, t}: +c : List<&2, U32> = Con{x, cur} +full = Nat.is_eq(1n+i, n) cr.oct.pieces.go(t, n, cr.oct.pieces.i(full, 1n+i), cr.oct.pieces.cur(full, c), cr.oct.pieces.step(full, c, acc)) Uses (8): 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.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/octets.bend&name=cr.oct.flush https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/octets.bend&name=cr.oct.pieces.cur https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/octets.bend&name=cr.oct.pieces.i https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/octets.bend&name=cr.oct.pieces.step