DynamicArray.drain_len_owned: def of bend-collections@1.0.0.0 Import: import bend-collections@1.0.0.0/src/containers/dynamic_array.bend as DynamicArray Lines 668-673 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=668&end_line=673 import Base def drain_len_owned(~T: Type, len: Nat, arr: Array>) -> List<&1, T>: match len: case 0n: Nil{} case 1n+ +m: drain_go_owned(~T, m, Nil{}, Array.swap(Maybe<&1, T>, arr, U32.from_nat(m), None{})) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array.swap 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=U32.from_nat https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/dynamic_array.bend&name=drain_go_owned