facebook / regenerator

Source transformer enabling ECMAScript 6 generator functions in JavaScript-of-today.
http://facebook.github.io/regenerator/
MIT License
3.82k stars 1.16k forks source link

Compile to pure function #660

Open dtornow opened 1 year ago

dtornow commented 1 year ago

Hello,

I have a question: Is regenerator a good starting point to compile a coroutine into a pure function akin to

next : (State x Value) -> (State x Value)

Here, State would be JSON serializable.

That way, we'd have serializable continuations.

Is that possible or does that amount to a complete rewrite?