
I think he means
symmetricDifference a b = (a `union` b) `difference` (a `intersection` b)
Or equivalently
symmetricDifference a b = (a `difference` b) `union` (b `difference` a)
Basically the elements in one of the two sets but not both. He's claiming a
direct function would be faster than combining three.
Note that (a `difference` b \= b `difference` a) but (a
`symmetricDifference` b == b `symmetricDifference` a).
On Sun, Jun 21, 2015 at 3:15 PM, Ruben Astudillo
On 20/06/15 21:49, Zemyla wrote:
Alternatively, could we get a merge interface for Set and IntSet roughly matching Map and IntMap?
Could you expand on what you mean? I understand it as that having operations of (Int)Map for (Int)Set, why don't just use (Int)Map then? _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe