def tf.gen
import bend-osdev-legacy-ciphers@0.1.0.0/twofish.bend as Twofishimport Base
58def tf.gen(~f: U32 -> U32, n: Nat, +i: U32) -> List<&2, U32>:
59 match n:
60 case 0n:
61 Nil{}
62 case 1n+p:
63 Con{f(i), tf.gen(~f, p, U32.add(i, 1))}