create modules
A simple example
Method add
with two arguments, returns sum
modules/math.lua
local M = {}
local function add(a, b)
return a + b
end
rawset(M, 'add', add)
return M
An example: