lua-users home
lua-l archive

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


Jun Wu wrote:
I found function() can do the trick, without unpack() or {}.
You may try this code:

function a(...)
  function b(...)
    return ...
  end
  return b(...), "a"
end

This won't work either.

There are two known tricks that will work:
a) packing ... into a table (and storing the 'n' value), and
b) using recursive function

--
Shmuel