
20 Jul
2014
20 Jul
'14
6:51 a.m.
On 2014-07-18 21:26, Frerich Raabe wrote:
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 don't know whether this is relevant to the decision making process, but it appears there's some precedence already in the 'basic-prelude' package by Dan Burton and Michael Snoyman: the 'CorePrelude' module exposes an 'equating' function: https://hackage.haskell.org/package/basic-prelude-0.3.8/docs/CorePrelude.htm... - Frerich