You can embed the state in your lambda context, it really isn't as difficult as what people claim.
The author just chose to write it as a state machine, but you don't have to. Write it in whatever style helps you reach correctness.
You still need the state and the dispatcher, even if the former is a little more hidden in the implicit closure type.
You still need the state and the dispatcher, even if the former is a little more hidden in the implicit closure type.