Symmetric difference for Set and IntSet

Andrew Lelechenko andrew.lelechenko at gmail.com
Wed Jun 17 19:25:01 UTC 2020


Hi all,

I propose to add a new combining function to `Data.Set` and `Data.IntSet` with the following semantics (but better implementation):

symmetricDifference :: Set a -> Set a -> Set a
symmetricDifference x y = (x \\ y) <> (y \\ x)

The context is that Federico (CC'ed) is working on a GSoC project about faster factorisation algorithms in `arithmoi` (http://hackage.haskell.org/package/arithmoi), and the symmetric difference is a basic building block for sparse linear algebra over GF(2) field.

Best regards,
Andrew


More information about the Libraries mailing list