lua-users home
lua-l archive

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

Thanks, that's interesting.

Does these anonymous functions forced to return some expression as result?
What about other simple functions?

local x = 0

local function add(delta)
   x = x + delta

Is it possible to use short syntax for add() ?


Assignment is not an expression in Lua.
Should this definition cause compilation error?