Module:Sandbox

-- This is a sandbox for testing lua scripts. -- See Extension:Scribunto for more information.

local p = {}

function p.f(x) r=x*x return r end

function p.foreach(frame) local fname = frame.args[1] local delim = frame.args[2] or nil finalstr = '' for n,v in frame:argumentPairs do      if n > 3 and delim then finalstr = finalstr .. delim end if n>2 then finalstr = finalstr .. fname(v) end end return finalstr end return p