def grows
import bendtorch@1.3.0.0/main.bend as Bendtorchimport Base
2649# rows i.. of G; r is row i
2650def grows(left: Nat, +i: Nat, +t: Nat, +hd: Nat, +sc: F32, +ds: U32, +dc: U32, +vs: U32, +vc: U32, r: GR) -> GW:
2651 match left r:
2652 case 0n GR{d, v, A2{p, g}, n}:
2653 GW{d, v, p, g}
2654 case 1n+m GR{d, v, A2{p, g}, n}:
2655 grows(m, 1n+i, t, hd, sc, ds, dc, vs, vc, grow(1n+i, t, hd, sc, ds, dc, vs, vc, d, v, p, g))