def fill
import bend-osdev-algo@0.1.0.0/check.bend as Checkimport Base
14def fill(xs: List<&2, U32>, +i: U32, a: Array<U32>) -> Array<U32>:
15 match xs:
16 case Nil{}:
17 a
18 case Con{x, t}:
19 fill(t, U32.inc(i), Array.set(U32, a, i, x))