
18 Jul
2014
18 Jul
'14
3:31 p.m.
Am 18.07.2014 21:26, schrieb Frerich Raabe:
In a similiar vein as with 'comparing', I think it would be nice if there was a function which encapsulates this use case, like
equating :: Eq b => (a -> b) -> a -> a -> Bool equating = on (==)
such that one can write
groupBy (equating snd)
I think it belongs to Data.Eq. I have already added it to my own Data.Eq module: http://hackage.haskell.org/package/utility-ht-0.0.10/docs/Data-Eq-HT.html this way I do not need to depend on a new GHC version in order to use it.