lua-users home
lua-l archive

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


on 9/1/05 9:26 AM, Rici Lake at lua@ricilake.net wrote:

> A simpler and possibly more general one would be:
> 
>  for i, v in eachi(<list of values>) do
> 
> which you could call:
> 
>  for i, v in eachi(...) do
> 
> but it does require copying the ... several times.

That works. It's still a reasonably low proportionality constant and most
uses of a foreach form would have required generating a closure.

I do recall some limit on the number of upvalues a C function can have. How
does this compare to the limits on the number of arguments a function can
take -- i.e., can we fit all of ... into individual upvalues?

Mark