One nitpick: local function declarations, like
local function g(x) return g(x) end
local g; g = function (x) return g(x) end
One nitpick: local function declarations, like
are actually the same as writing . Without that first local g; statement, local functions wouldn't be able to call themselves recursively.