lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Wed, Mar 02, 2011 at 10:27:01AM +0200, Axel Kittenberger wrote:
> It would be cool if we could do:
> for i, v in ... do
> tough, without having to pack ...

That's actually valid syntax already :-)

function f(...)
    for i,v in ... do print(i,v) end

function g(x,y) if x~=y then return y+1, (y+1)^2 end end