def ar.fill
import bend-kit-regex@0.8.0.0/regex.bend as Regeximport Base
1843def ar.fill(xs: List<&2, Th>, a: Array<Th>, +i: U32) -> Array<Th>:
1844 match xs:
1845 case Nil{}:
1846 a
1847 case Con{th, rest}:
1848 ar.fill(rest, Array.set(Th, a, i, th), (i + 1 : U32))