| Copyright | (c) Erich Gut |
|---|---|
| License | BSD3 |
| Maintainer | zerich.gut@gmail.com |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
OAlg.Data.Ord
Description
Data.Ord enriched with some additional elements.
Synopsis
- module Data.Ord
- fcompare :: Ord i => (a -> i) -> a -> a -> Ordering
- wcompare :: (w -> w -> Ordering) -> (a -> w) -> a -> a -> Ordering
- coCompare :: (a -> a -> Ordering) -> a -> a -> Ordering
- compare2 :: (a -> a -> Ordering) -> (b -> b -> Ordering) -> (a, b) -> (a, b) -> Ordering
- sortFst :: Ord a => [(a, b)] -> [(a, b)]
- sortFstBy :: (a -> a -> Ordering) -> [(a, b)] -> [(a, b)]
- sortSnd :: Ord b => [(a, b)] -> [(a, b)]
- sortSndBy :: (b -> b -> Ordering) -> [(a, b)] -> [(a, b)]
- data Closure x
- cmin :: Ord x => [x] -> Closure x
- cmax :: Ord x => [x] -> Closure x
- cspan :: Ord x => [x] -> Span x
- type Span x = (Closure x, Closure x)
- enumSpan :: (Enum i, Ord i) => i -> Closure i -> [i]
Documentation
module Data.Ord
fcompare :: Ord i => (a -> i) -> a -> a -> Ordering Source #
comparing according to the mapped values.
wcompare :: (w -> w -> Ordering) -> (a -> w) -> a -> a -> Ordering Source #
comparing according to the given ordering relation on the mapped values.
compare2 :: (a -> a -> Ordering) -> (b -> b -> Ordering) -> (a, b) -> (a, b) -> Ordering Source #
comparing of pairs.
sortFstBy :: (a -> a -> Ordering) -> [(a, b)] -> [(a, b)] Source #
sorting according to the first component.
sortSndBy :: (b -> b -> Ordering) -> [(a, b)] -> [(a, b)] Source #
sorting according to the second component.
the closer of a linear ordered x.
Instances
| Read x => Read (Closure x) Source # | |
| Show x => Show (Closure x) Source # | |
| Eq x => Eq (Closure x) Source # | |
| Ord x => Ord (Closure x) Source # | |
| Validable x => Validable (Closure x) Source # | |