hawl-2006.6.4ContentsIndex
Hawl.Util.List
Synopsis
splitBy :: (a -> Bool) -> [a] -> [[a]]
replace :: Eq a => a -> a -> [a] -> [a]
glue :: [a] -> [[a]] -> [a]
sortNub :: Ord a => [a] -> [a]
sortNubBy :: (a -> a -> Ordering) -> [a] -> [a]
sortGroupBy :: (a -> a -> Ordering) -> [a] -> [[a]]
buildMultiMap :: Ord a => [(a, b)] -> [(a, [b])]
trimBy :: (a -> Bool) -> [a] -> [a]
trimSpace :: String -> String
Documentation
splitBy :: (a -> Bool) -> [a] -> [[a]]
replace
:: Eq a
=> aValue to look for
-> aValue to replace it with
-> [a]Input list
-> [a]Output list
Replace all instances of a value in a list by another value.
glue :: [a] -> [[a]] -> [a]
sortNub :: Ord a => [a] -> [a]
Sort a list and remove all duplicates.
sortNubBy :: (a -> a -> Ordering) -> [a] -> [a]
Sort a list and remove all duplicates, given an ordering.
sortGroupBy :: (a -> a -> Ordering) -> [a] -> [[a]]
Sorts and then groups elements given an ordering.
buildMultiMap :: Ord a => [(a, b)] -> [(a, [b])]
Group tuples by their first elements.
trimBy :: (a -> Bool) -> [a] -> [a]
trimSpace :: String -> String
Produced by Haddock version 0.7