Bendtorch.chunk_bytes: def of bendtorch@1.3.0.0 Import: import bendtorch@1.3.0.0/main.bend as Bendtorch Lines 3596-3602 of bendtorch@1.3.0.0/main.bend: https://jend.leeeet.dev/read.txt?path=bendtorch@1.3.0.0/main.bend&start_line=3596&end_line=3602 import Base # the bytes of xs[i - k + 1 .. i] onto acc, built from the last number back (no reverse) def chunk_bytes(k: Nat, +i: U32, rx: Array & F32, acc: List<&2, U32>) -> Array & List<&2, U32>: match k rx: case 0n Tuple{a, v}: Tuple{a, acc} case 1n+q Tuple{a, v}: +u = bits(v) chunk_bytes(q, U32.sub(i, 1), Array.get(F32, a, U32.sub(i, 1)), byte_of(u, 0n) <> byte_of(u, 8n) <> byte_of(u, 16n) <> byte_of(u, 24n) <> acc) Uses (11): 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=F32 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=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.sub https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=bits https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=byte_of