lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> You have to write plus(3), and then can't apply the result directly to 4

You can, as long as you use the parentheses: plus(3)(4) is legal syntax.


> One other annoyance is that you can't directly apply an anonymous function:
> 
> (function (x) print(x) end) "hello"

You can write «Id(function (x) print(x) end) "hello"» (where Id is the
identity function), but I agree this is a little inconvenient.

-- Roberto