Package: Lambda
This mod hacks syntactic sugar for "lambda functions" into Lua by simply loading and caching strings containing Lua code via the (global!) l function.
l
Unfortunately, the way this is done has too many drawbacks to be viable:
Just bite the bullet and instead of l"(...) ...", write function(...) return ... end.
l"(...) ..."
function(...) return ... end
If you can't take Lua not having enough syntactic sugar for you anymore, find an established Lua preprocessor that works for you and roll with that.
This mod hacks syntactic sugar for "lambda functions" into Lua by simply loading and caching strings containing Lua code via the (global!)
l
function.Unfortunately, the way this is done has too many drawbacks to be viable:
l
comes from (and why it should be used).Just bite the bullet and instead of
l"(...) ..."
, writefunction(...) return ... end
.If you can't take Lua not having enough syntactic sugar for you anymore, find an established Lua preprocessor that works for you and roll with that.