6 ms·
Wrapping an if in a lambda is unlikely to work as expected.
by _mpu 13y ago
Wrapping an if in a lambda is unlikely to work as expected.
- pygy_ 13y ago((if foo + -) 4 6) Can be compiled to (function() if foo then return plus else return minus end end)()(4, 6) It is far too verbose to be used in manually crafted Lua, but acceptable if you treat it as a compiler target (with the caveat that the lambda creation will prevent LuaJIT from JITting that piece of code).
- meric 13y agoPlug https://github.com/meric/l2l https://github.com/meric/l2l "A object-oriented, unicode-enabled lisp that compiles to and runs as fast as Lua. Equipped with macros and compile-time compiler manipulation. Comes with all built-in Lua functions."