I didn't think of that. Thanks! But it seems that in Lua, functions defined in functions are within the outer function scope.
```
/tmp » cat t.lua                                           songgao@C02KK643DR53
function func()
  function _func()
    print('a')
  end
end

_func()
------------------------------------------------------------
/tmp » luajit t.lua                                        songgao@C02KK643DR53
luajit: t.lua:7: attempt to call global '_func' (a nil value)
stack traceback:
	t.lua:7: in main chunk
	[C]: at 0x01000015c0
------------------------------------------------------------
/tmp »
```