lua-users home
lua-l archive

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


On Tuesday 11 November 2008, Shmuel Zeigerman wrote:
> There are two known tricks that will work:
> a) packing ... into a table (and storing the 'n' value), and
> b) using recursive function

like this:

function app (extra, a, ...)
	if select('#', ...) > 1 then
		return a, app (extra, ...)
	else
		return a, ..., extra
	end
end

but i'm not positive that it's faster than using a table

-- 
Javier

Attachment: signature.asc
Description: This is a digitally signed message part.