def u32.fill
import bend-kit-migrate@0.3.0.0/migrate.bend as Migrateimport Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes
332def u32.fill(f: Nat, a: Array<U32>, +i: U32, +n: U32) -> Array<U32>:
333 match f:
334 case 0n:
335 a
336 case 1n+p:
337 +q = (n / 10 : U32)
338 u32.fill(p, Bytes.poke(a, i, (48 + n - q * 10 : U32)), (i - 1 : U32), q)