def grow
import bend-collections@1.0.0.0/src/crypto/aes/aes.bend as Aesimport Base
import bend-collections@1.0.0.0/src/crypto/aes/types.bend as T
130def grow(n: Nat, +nk: Nat, +i: Nat, +history: List<&2, T.Quad>) -> List<&2, T.Quad>:
131 match n:
132 case 0n:
133 history
134 case 1n+p:
135 grow(p, nk, 1n+i, next_word(nk, i, history) <> history)