I'm going to be "that guy":
-- These are the same:
-- ...snip...
local function g(x) return math.sin(x) end
local g = function (x) return math.sin(x) end
According to the Lua Reference Manual [1], this example isn't correct. Rather, this is the correct translation: local function g(x) return math.sin(x) end
local g; g = function (x) return math.sin(x) end
From the manual: "This only makes a difference when the body of the function contains references to f."