def packed.chunk.take
import emerging-ezhttp@0.21.0.0/src/packed.bend as Packedimport Base
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes
40# a chunk's octets copied out, then on to the chunk-size line after its CRLF
41def packed.chunk.take(r: Bytes.Bytes & Bytes.Bytes, +next: U32,
42 acc: List<&1, Bytes.Bytes>,
43 go: Bytes.Bytes -> U32 -> List<&1, Bytes.Bytes> -> Parts) -> Parts:
44 (b, part) = r
45 go(b)(next)(part <> acc)