[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Pari/GP has introduced lightweight anonymous function syntax
- From: Egor Skriptunoff <egor.skriptunoff@...>
- Date: Sun, 17 Jun 2012 10:45:04 +0300
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
end
Is it possible to use short syntax for add() ?
add=(delta)->x=x+delta
Assignment is not an expression in Lua.
Should this definition cause compilation error?