Compiling the compiler, the example and the demo by hand is error prone, so a single script keeps the whole flow reproducible and ignores build outputs.
15 lines
249 B
Lua
15 lines
249 B
Lua
-- Example module that requires another compiled module.
|
|
local mathx = require("demo.mathx")
|
|
|
|
local M = {}
|
|
|
|
function M.hello(name)
|
|
return "Bonjour " .. name .. " !"
|
|
end
|
|
|
|
function M.double_factorial(n)
|
|
return mathx.factorial(n) * 2
|
|
end
|
|
|
|
return M
|