lua-users home
lua-l archive

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

In the topmost code, your '...' will point to the arguments of the enclosed function (being nil), not the outer generator function's arguments.

Also, ... values will need some storage frame for them, which the 't' table provides (garbage collection, lifespan handling etc.).


Peter Jacobi kirjoitti 10.11.2008 kello 11:17:

Dear All,

Is there a deep reason that

function (...)
  return function () return ... end

doesn't work and must be simulated using:

function (...)
   t = {...}
   return function () return unpack (t) end