Vec.Vec.to_list: def of bend-kit-collections@0.1.4.1 Import: import bend-kit-collections@0.1.4.1/vec.bend as Vec Lines 119-126 of bend-kit-collections@0.1.4.1/vec.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-collections@0.1.4.1/vec.bend&start_line=119&end_line=126 import Base # The elements, first to last. def Vec.to_list(~T: Data, v: Vec) -> List<&2, T>: match v: case VNil{}: Nil{} case Vec{+n, buf}: +last = (n - 1 : U32) Vec.to_list.go(~T, U32.to_nat(n), last, Nil{}, Array.get(T, buf, last)) Uses (7): 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=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.sub https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.to_nat https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/vec.bend&name=Vec https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/vec.bend&name=Vec.to_list.go