# Order

## Definitions

`def maxBy(cmp: a -> (a -> Comparison), x: a, y: a): a`

SourceReturns the maximum of `x`

and `y`

according to the given comparator `cmp`

.

`def minBy(cmp: a -> (a -> Comparison), x: a, y: a): a`

SourceReturns the minimum of `x`

and `y`

according to the given comparator `cmp`

.

`def thenCompare(c1: Comparison, c2: Lazy[Comparison]): Comparison`

SourceLazily combines two comparisons.

If `c1`

is either `Comparison.LessThan`

or `Comparison.GreaterThan`

then `c2`

is never evaluated.