Archive.cd.go: def of bend-kit-archive@0.5.1.0 Import: import bend-kit-archive@0.5.1.0/archive.bend as Archive Lines 202-214 of bend-kit-archive@0.5.1.0/archive.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-archive@0.5.1.0/archive.bend&start_line=202&end_line=214 import Base import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes # k entries left; r holds the next header's offset and the headers so far, reversed. def cd.go(k: Nat, r: Array & Result<&1, &1, U32 & String, U32 & List<&2, Header>>, +end: U32, +cdoff: U32) -> Array & Result<&1, &1, U32 & String, List<&2, Header>>: match k: case 0n: (a, res) = r (a, cd.fin(res, end)) case 1n+q: (a, res) = r match res: case Fail{e}: (a, Fail{e}) case Done{(+p, acc)}: cd.go(q, cd.entry(Bytes.fits(end, p, 46), a, p, end, cdoff, acc), end, cdoff) Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array 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=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=bend-kit-archive@0.5.1.0/archive.bend&name=Header https://jend.leeeet.dev/definition.txt?path=bend-kit-archive@0.5.1.0/archive.bend&name=cd.entry https://jend.leeeet.dev/definition.txt?path=bend-kit-archive@0.5.1.0/archive.bend&name=cd.fin https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=fits