local getArgs = require('Module:Arguments').getArgs
local p = {}
local function makeInvokeFunction(funcName)
-- makes a function that can be returned from #invoke, using
-- [[Module:Arguments]].
return function (frame)
local args = getArgs(frame, {parentOnly = true})
return p[funcName](args)
end
end
p.row = makeInvokeFunction('_row')
function p._row(args)
local result
result = 'Simple loop\n'
for i = 10,100,10 do
result = result .. i .. '\n'
end
return result
end
p.link = makeInvokeFunction('_link')
function p._link(args)
local result
result = 'Simple loop\n'
for i = 10,100,10 do
result = '\n' .. result .. i .. '\n\n'
end
return result
end
return p