Coroutine monad implementation.