Equivalence of State Machines and Coroutines — LessWrong