Maintainer | Simon Meier <iridcode@gmail.com> |
---|---|
Safe Haskell | Safe-Inferred |
Extension.Data.Monoid
Description
A variant of Data.Monoid that also exports '()' for mappend
.
- newtype MinMax a = MinMax {
- getMinMax :: Maybe (a, a)
- minMaxSingleton :: a -> MinMax a
Documentation
A newtype wrapper around Maybe
that returns a tuple of the minimum and
maximum value encountered, if there was any.
Instances
Ord a => Monoid (MinMax a) |
minMaxSingleton :: a -> MinMax aSource
Construct a MinMax
value from a singleton value.