def rc4.go
import bend-osdev-legacy-ciphers@0.1.0.0/rc4.bend as Rc4import Base
import bend-osdev-bytes@0.1.0.0/bytes.bend as B
150def rc4.go(xs: List<&2, U32>, st: LcRc4State, acc: List<&2, U32>) -> LcRc4Run:
151 match xs:
152 case Nil{}:
153 LcRc4Run{st, rc4.rev_onto(acc, Nil{})}
154 case Con{x, t}:
155 +n = rc4.next(st)
156 rc4.go(t, rc4.step.st(n), Con{B.byte(U32.xor(x, rc4.step.k(n))), acc})