Add intersections and unions to Set
bruant.d at gmail.com
Tue Mar 5 06:15:03 PST 2013
I agree on the need but forsee problems with parametrized equivalence
operator  like "which comparator should be used for the union of 2
sets with different comparators?"
The need for set intersection/union/minus/etc. feels more important than
the need to parametrized the comparator.
Le 04/03/2013 19:08, aleth at instantbird.org a écrit :
> It would be useful to be able to form the intersection and the union of
> two Sets. These are natural operations that are currently not part of
> the API
> Similar methods would make sense for Map, but one would have to think
> about what to do in the case where the key but not the value matches.
> An intersection is equivalent to a particular filter, so an alternative
> might be to add a method like Array.filter to Sets instead.
> (I filed bug 847355 for this and was told this mailing list was the
> right place for this suggestion.)
More information about the es-discuss