|
|
|
Description |
Variant of Data.List functions like Data.List.group, Data.List.sort
where the comparison is performed on a key computed from the list elements.
In principle these functions could be replaced by e.g. sortBy (compare on f),
but f will be re-computed for every comparison.
If the evaluation of f is expensive,
our functions are better, since they buffer the results of f.
|
|
Synopsis |
|
nub :: Eq b => (a -> b) -> [a] -> [a] | | sort :: Ord b => (a -> b) -> [a] -> [a] | | minimum :: Ord b => (a -> b) -> [a] -> a | | maximum :: Ord b => (a -> b) -> [a] -> a | | group :: Eq b => (a -> b) -> [a] -> [[a]] | | merge :: Ord b => (a -> b) -> [a] -> [a] -> [a] |
|
|
Documentation |
|
nub :: Eq b => (a -> b) -> [a] -> [a] | Source |
|
|
sort :: Ord b => (a -> b) -> [a] -> [a] | Source |
|
|
minimum :: Ord b => (a -> b) -> [a] -> a | Source |
|
argmin
|
|
maximum :: Ord b => (a -> b) -> [a] -> a | Source |
|
argmax
|
|
group :: Eq b => (a -> b) -> [a] -> [[a]] | Source |
|
Divides a list into sublists such that the members in a sublist
share the same key.
It uses semantics of Data.List.HT.groupBy,
not that of Data.List.groupBy.
|
|
merge :: Ord b => (a -> b) -> [a] -> [a] -> [a] | Source |
|
|
Produced by Haddock version 2.4.2 |