Translations:Extension:Scribunto/Lua reference manual/1410/en

Lua functions are lexical closures. A common idiom is to declare "private static" variables as locals in the scope where the function is declared. For example,