Add Data.Eq.equating to match Data.Ord.comparing?
ndmitchell at gmail.com
Thu Sep 20 06:32:51 EDT 2007
> This could be generalised to a function such as
> > pairWise :: (b -> b -> c) -> (a -> b) -> a -> a -> c
> > pairWise pair project x y = pair (project x) (project y)
We call this function "on", and I believe it has been recently added
to the standard libraries.
> > comparing = pairWise compare
> > equating = pairWise (==)
"comparing" has certainly been added recently, and I think "equating" as well.
More information about the Libraries