Autrijus Tang <[EMAIL PROTECTED]> writes:

> On Sat, Feb 12, 2005 at 11:10:13AM -0600, Patrick R. Michaud wrote:
>> No, consider
>> 
>>     $a = 1;
>>     $b = 2;
>> 
>>     one($a, $a, $b)  # false
>>     one($b)          # true
>
> Right.  Evidently I need to sleep real soon. :-)
>
> However, is there a way to remove the $a from the equation?  I'd like
> to keep implementation decision of using Sets without duplicate
> elements, unless it is unavoidable, in which case I'll switch back
> to a List...

  I think one([EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]) is 
equivalent to all(none([EMAIL PROTECTED]),one([EMAIL PROTECTED])),
which should permit an implementation using Sets without duplicate
elements.  Whether it is worth it is another matter ...


Eirik
-- 
Skill without imagination is craftsmanship and gives us many useful objects
such as wickerwork picnic baskets.  Imagination without skill gives us modern
art.
                -- Tom Stoppard

Reply via email to