def fill_n
import bend-ml-tensor-array@0.1.19.0/main.bend as BendMlTensorArrayimport Base
1605# writes the first n numbers of xs at index i (and nothing past them)
1606def fill_n(n: Nat, xs: List<&2, F32>, +i: U32, a: Array<F32>) -> Array<F32>:
1607 match n xs:
1608 case 1n+p Con{h, t}:
1609 fill_n(p, t, (i + 1 : U32), Array.set(F32, a, i, h))
1610 case _ _:
1611 a