DynamicArray.tl_go: def of bend-collections@1.0.0.0 Import: import bend-collections@1.0.0.0/src/containers/dynamic_array.bend as DynamicArray Lines 211-218 of bend-collections@1.0.0.0/src/containers/dynamic_array.bend: https://jend.leeeet.dev/read.txt?path=bend-collections@1.0.0.0/src/containers/dynamic_array.bend&start_line=211&end_line=218 import Base # k slots are still to be read, the last of them first: the pair `r` is slot # k - 1, already read. def tl_go(k: Nat, -T: Data, acc: List<&2, T>, r: Array> & Maybe<&2, T>) -> Array> & List<&2, T>: match k r: case 0n Tuple{a, x}: (a, acc) case 1n+ +m Tuple{a, x}: tl_go(m, T, cons_some(T, x, acc), Array.get(Maybe<&2, T>, a, U32.from_nat(dec1(m)))) Uses (10): 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=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe 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.from_nat https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/dynamic_array.bend&name=cons_some https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/dynamic_array.bend&name=dec1