[Haskell-cafe] groupBy without Ord?

martin martin.drautzburg at web.de
Sat Mar 22 16:51:55 UTC 2014

Hello all,

when I groupBy a list in order to cluster elements which satisfy some sort of equality, I usually have to sort the list
first, which requires Ord. However groupBy itself does not require Ord, but just Eq.

How can I groupBy a List whose elements are only instances of Eq but not of Ord?

More information about the Haskell-Cafe mailing list