def Vec.copy
import bend-kit-collections@0.1.4.1/vec.bend as Vecimport Base
21def Vec.copy(
22 ~T: Data, fuel: Nat, +i: U32, dst: Array<T>, r: Array<T> & T
23) -> Array<T>:
24 match fuel:
25 case 0n:
26 dst
27 case 1n+p:
28 (src, x) = r
29 +j = U32.inc(i)
30 Vec.copy(~T, p, j, Array.set(T, dst, i, x), Array.get(T, src, j))