[Haskell-cafe] Symmetric Difference for Data.Set and Data.IntSet?

Ben Franksen ben.franksen at online.de
Sun Jul 5 22:33:33 UTC 2015


Zemyla wrote:
> Could this be implemented as a primitive? I know it can be made from union
> and difference, or doing toList on both of them, taking the symmetric
> difference, and using fromDistinctAscList on the result, but it'd probably
> be much faster if it could be done natively, like can be done with
> Data.Map.mergeWithKey.

+1

> Alternatively, could we get a merge interface for Set and IntSet roughly
> matching Map and IntMap?
-- 
"Make it so they have to reboot after every typo." ― Scott Adams




More information about the Haskell-Cafe mailing list