HaloO,

Darren Duncan wrote:
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.

OK, but you are not using the 'set with additional behavior' of
junctions. How would that be spelled with a pure set?

   set(@items).elements.size === @items.size

perhaps? This would nicely blend with the junction forms. Would
it even be the case that Set is a super role of the junctions?

Regards,
--

Reply via email to