-- These are the same: -- ...snip... local function g(x) return math.sin(x) end local g = function (x) return math.sin(x) end
local function g(x) return math.sin(x) end local g; g = function (x) return math.sin(x) end
[1] http://www.lua.org/manual/5.2/manual.html#3.4.10
> local g=function() print(type(g)) end g() nil > local function g() print(type(g)) end g() function
[1] http://www.lua.org/manual/5.2/manual.html#3.4.10