On Sat, Feb 12, 2005 at 06:34:05PM +0100, Eirik Berg Hanssen wrote: > 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 ...
Indeed. Perhaps I can refactor one() to store it with two subsets: the "none" set and the "one" set; new elements are checked against the "one" set; if duplicates are found, it gets moved into the "none" set. That way the type of the junction is still one(); the .values() method will then return two items for each element in the none() subset, and one for each in the one() subset. Does it make sense? Thanks, /Autrijus/
pgpQD8lgtm8ll.pgp
Description: PGP signature