Re: Pari/GP has introduced lightweight anonymous function syntax
[
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: 2012年6月17日 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?