lua-users home
lua-l archive

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


On Sun, Nov 15, 2009 at 01:29:29PM -0500, Jim Pryor wrote:
> setmetatable(Set, {__call = function(cls, ...)
>     local obj = {}
>     for i=1,select('#',...) do
>         obj[select(i,...)] = true
>     end
>     return setmetatable(obj, cls)
> end

In both examples that last line should be:

> end})

-- 
Profjim
profjim@jimpryor.net