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

Lua functions are closures, meaning that they maintain a reference to the scope in which they are declared and can access and manipulate variables in that scope.