Lua does not provide any explicit mechanism to deal with
variable number of arguments in function calls.
However, one can use table constructors to simulate this mechanism.
As an example, suppose a function to concatenate all its arguments.
It could be written like
function concat (o)
local i = 1
local s = ''
while o[i] do
s = s .. o[i]
i = i+1
end
return s
end
To call it, one uses a table constructor to join all arguments:
x = concat{"hello ", "john", " and ", "mary"}