Last modified: 2014-04-21 03:10:49 UTC
Scribunto should allow coroutines in Lua. The only explanation I've found for excluding the coroutine package is that "No application is known for us, so it has not been reviewed for security." I would like to address lack of application: underscore.lua[1] provides an assortment of useful functions that mediawiki wikis can benefit from having available. It uses coroutines to implement iter and range functions. A simple coroutine example: function range(b,e) return coroutine.wrap(function() for i = b, e do coroutine.yield(i); end end); end for n in range(1,10) do print(n); end [1] https://raw.github.com/mirven/underscore.lua/master/lib/underscore.lua