Add Data.Eq.equating to match Data.Ord.comparing?
Malcolm.Wallace at cs.york.ac.uk
Thu Sep 20 06:54:47 EDT 2007
> > > 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.
> x = groupBy (equating snd) pairs
x = groupBy ((==) `on` snd) pairs
More information about the Libraries