function ::= function funcbody
funcbody ::= `(´ [parlist1] `)´ block end
parlist1 ::= namelist [`,´ `...´] | `...´
... means vararg function.
----- Original Message -----
From: wj
To: lua@bazar2.conectiva.com.br
Sent: Friday, January 12, 2007 1:24 PM
Subject: '...' is a variable,who can explain
look at this code:
--codes begin
function joinFunc(f1,f2)
return function (...)
return f1(f2(...)) --...treated as a variable! is it maze!
end
end
f1 = joinFunc(print,math.abs)
f1(-2) --out:2
--codes end
why the