[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: New metamethod for method lookup
- From: Jim Pryor <lists+lua@...>
- Date: Sun, 15 Nov 2009 13:32:13 -0500
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