|
|
|
Description |
Utitlity functions on lists.
|
|
Synopsis |
|
|
|
Documentation |
|
|
|
|
|
|
|
|
Check if a list has a given prefix. If so, return the list
minus the prefix.
|
|
|
Split a list into sublists. Generalisation of the prelude function
words.
words xs == wordsBy isSpace xs
|
|
|
Chop up a list in chunks of a given length.
|
|
holes :: [a] -> [(a, [a])] | Source |
|
All ways of removing one element from a list.
|
|
|
Check whether all elements in a list are distinct from each
other. Assumes that the Eq instance stands for an equivalence
relation.
|
|
|
An optimised version of distinct.
Precondition: The list's length must fit in an Int.
|
|
|
|
|
Checks if all the elements in the list are equal. Assumes that
the Eq instance stands for an equivalence relation.
|
|
groupBy' :: (a -> a -> Bool) -> [a] -> [[a]] | Source |
|
A variant of groupBy which applies the predicate to consecutive
pairs.
|
|
|
|
groupOn :: Ord b => (a -> b) -> [a] -> [[a]] | Source |
|
groupOn f = groupBy ((==) `on` f) . sortBy (compare `on` f).
|
|
|
extractNthElement n xs gives the n-th element in xs
(counting from 0), plus the remaining elements (preserving order).
|
|
|
|
|
|
|
|
|
|
|
|
Produced by Haddock version 2.6.1 |