Module:Sandbox/The Master of Hedgehogs
Jump to navigation
Jump to search
Usage
[edit source]{{#invoke:Sandbox/The Master of Hedgehogs|function_name}}
local p = {} -- Defines a variable p as an empty table, but *not* nil.
function p.main( frame ) -- This block defines the table element p["main"] as a function.
return "I don't know. Wow!" -- The string result of the function.
end -- Ends the block defining the function object p["main"] (or p.main).
return p -- This returns the table p, which under the key "main" contains the
-- function above (p.main), which when called returns string "Hello world".