Darren Duncan wrote: > Unless I'm mistaken, you may be going about this the wrong way. > > Within a system that already has an underlying > set-like type, the Junction in this case, a test > for uniqueness is (pardon any spelling): > > all(@items).elements.size === @items.size > > The all() will strip any duplicates, so if the > number of elements in all(@items) is the same as > @items, then @items has no duplicates. >
Perhaps, but then Junctions might not assume elements have equality or identity operations defined. To do that you need to require this (and which identity operator would you like to use today?), and that would also have the side effect of making creating a junction an O(N^2) operation. I think that the S06 definition needs re-wording. It's more like a Bag than a Set AIUI. Sam.