def grow.go

lawful-bytes@0.1.1.0 · bytes.bend:56

import lawful-bytes@0.1.1.0/bytes.bend as Bytes
import Base

56# Word i onwards copied into dst; r holds word i of the old block.
57def grow.go(n: Nat, r: Array<U32> & U32, dst: Array<U32>, +i: U32) -> Array<U32>:
58  match n:
59    case 0n:
60      (src, w) = r
61      dst
62    case 1n+k:
63      (src, +w) = r
64      grow.go(k, Array.get(U32, src, (i + 1 : U32)), Array.set(U32, dst, i, w), (i + 1 : U32))

Uses (8)

Used by (3)