fay-base-0.21.2.0: The base package for Fay.
Safe HaskellNone
LanguageHaskell2010

Data.Ord

Description

Orderings

Synopsis

Documentation

comparing :: Ord a => (b -> a) -> b -> b -> Ordering Source #

comparing p x y = compare (p x) (p y)

Useful combinator for use in conjunction with the xxxBy family of functions from Data.List, for example:

  ... sortBy (comparing fst) ...