> ... and for which application do you think of this? Can you describe
> your application more in detail?
This would allow you to express many more kinds of control flow in lua.
More concretely I've recently been working on a library for limited handling of algebraic effects in lua. The fact I cannot retain a snapshot of the coroutine at a given point means I cannot encode things like non determinism in my system. Essentially anything which needs to backtrack.
I think with some work it would be possible; I am curious to know if other people have attempted this and if there are any reasons it would not be possible.