What is the difference between a local function and a normal function?

These two specifically are not exactly the same; they have a tiny difference in their scopes. Within the one defined as local function, foo (its name) can be accessed as an upvalue for recursion, while in the local foo = definition, it can not.

14 Likes