Module:User:Amb1ament0/debug

local export = {}

function export.echo3(frame) return frame:getParent:getTitle end

function export.echo2(frame) text = frame.args["text"] return string.gsub(text, "a", mw.ustring.char(0x100001)) end

function export.echo1(frame) text = frame.args["text"] return text end

function export.echo(frame) return frame.args["n"] end

function export.check(frame) text = frame.args["text"] local pe = require("Module:utilities").pattern_escape local rep, n = pe(text) return n end

function export.luaversion(frame) return _VERSION end

function export.factorial(frame) return fact(frame.args["n"]) end

-- Function to compute factorial local function fact(n) if n == 0 then return 1 else return n * fact(n - 1) end end

return export