Copyright | (c) OleksandrZhabenko 2020 |
---|---|
License | MIT |
Maintainer | olexandr543@yahoo.com |
Stability | Experimental |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- minMax23C :: (Ord a, InsertLeft t a, Monoid (t a)) => t a -> ((a, a), (a, a, a))
- minMax23ByC :: (Ord a, InsertLeft t a, Monoid (t a)) => (a -> a -> Ordering) -> t a -> ((a, a), (a, a, a))
- minMax32C :: (Ord a, InsertLeft t a, Monoid (t a)) => t a -> ((a, a, a), (a, a))
- minMax32ByC :: (Ord a, InsertLeft t a, Monoid (t a)) => (a -> a -> Ordering) -> t a -> ((a, a, a), (a, a))
- minMax33C :: (Ord a, InsertLeft t a, Monoid (t a)) => t a -> ((a, a, a), (a, a, a))
- minMax33ByC :: (Ord a, InsertLeft t a, Monoid (t a)) => (a -> a -> Ordering) -> t a -> ((a, a, a), (a, a, a))
Documentation
minMax23C :: (Ord a, InsertLeft t a, Monoid (t a)) => t a -> ((a, a), (a, a, a)) Source #
Given a finite structure returns a tuple with two minimum elements and three maximum elements. Uses just two passes through the structure, so may be more efficient than some other approaches.
minMax23ByC :: (Ord a, InsertLeft t a, Monoid (t a)) => (a -> a -> Ordering) -> t a -> ((a, a), (a, a, a)) Source #
A variant of the minMax23C
where you can specify your own comparison function.
minMax32C :: (Ord a, InsertLeft t a, Monoid (t a)) => t a -> ((a, a, a), (a, a)) Source #
Given a finite structure returns a tuple with three minimum elements and two maximum elements. Uses just two passes through the structure, so may be more efficient than some other approaches.
minMax32ByC :: (Ord a, InsertLeft t a, Monoid (t a)) => (a -> a -> Ordering) -> t a -> ((a, a, a), (a, a)) Source #
A variant of the minMax32C
where you can specify your own comparison function.
minMax33C :: (Ord a, InsertLeft t a, Monoid (t a)) => t a -> ((a, a, a), (a, a, a)) Source #
Given a finite structure returns a tuple with three minimum elements and three maximum elements. Uses just two passes through the structure, so may be more efficient than some other approaches.
minMax33ByC :: (Ord a, InsertLeft t a, Monoid (t a)) => (a -> a -> Ordering) -> t a -> ((a, a, a), (a, a, a)) Source #
A variant of the minMax33C
where you can specify your own comparison function.