Shorthand lambda patches for lua 5.4 and 5.1

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Shorthand lambda patches for lua 5.4 and 5.1

Flemming Madsen-3
I just made submissions for these on http://lua-users.org/wiki/LuaPowerPatches.
Search for "Shorthand lambdas"

Basically, the construction 
   |arglist| expression
is shorthand for 
   function(arglist) return expression end

I have an accompanying patch for luacheck (https://github.com/mpeterv/luacheck), if anybody needs that.