3 ms·
With a small patch to add coroutine.clone[1], you can have continuations in Lua[2]. [1] http://lua-users.org/lists/lua-l/2006-01/msg00652.html http://lua-users
by anonymoushn 15y ago
With a small patch to add coroutine.clone[1], you can have continuations in Lua[2].
[1] http://lua-users.org/lists/lua-l/2006-01/msg00652.html http://lua-users.org/lists/lua-l/2006-01/msg00652.html
[2] https://github.com/torus/lua-call-cc https://github.com/torus/lua-call-cc
- silentbicycle 15y agoWhich is to say, Lua's coroutines are isomorphic to single-shot continuations* - you can implement either in terms of the other. * Full continuations, with copying. Great paper: "Revisiting Coroutines" (ftp://ftp.inf.puc-rio.br/pub/docs/techreports/04_15_moura.pdf)