max package:dimensional

The largest representable finite floating-point quantity.
Return the maximum of two quantities; if one value is NaN, return it. Prefer the first if both values are NaN.
Maximum NaN payload for type a.
Return the maximum of two quantities; if one value is NaN, return the other. Prefer the first if both values are NaN.
The largest element of a non-empty structure. This function is non-total and will raise a runtime exception if the structure happens to be empty. A structure that supports random access and maintains its elements in order should provide a specialised implementation to return the maximum in faster than linear time.

Examples

Basic usage:
>>> maximum [1..10]
10
>>> maximum []
*** Exception: Prelude.maximum: empty list
>>> maximum Nothing
*** Exception: maximum: empty structure
WARNING: This function is partial for possibly-empty structures like lists.