Ord a => [a] -> [a] -bytestring +base

sort :: Ord a => [a] -> [a]
base Data.List
The sort function implements a stable sorting algorithm. It is a special case of sortBy, which allows the programmer to supply their own comparison function.
insert :: Ord a => a -> [a] -> [a]
base Data.List
The insert function takes an element and a list and inserts the element into the list at the last position or equal to the next element. In particular, if the list is sorted before the call, the result will also be sorted. It is a special case of insertBy, which allows the programmer to supply their own comparison function.
cycle :: [a] -> [a]
base Prelude, base Data.List
cycle ties a finite list into a circular one, or equivalently, the infinite repetition of the original list. It is the identity on infinite lists.
init :: [a] -> [a]
base Prelude, base Data.List
Return all the elements of a list except the last one. The list must be non-empty.
reverse :: [a] -> [a]
base Prelude, base Data.List
reverse xs returns the elements of xs in reverse order. xs must be finite.
tail :: [a] -> [a]
base Prelude, base Data.List
Extract the elements after the head of a list, which must be non-empty.
maximum :: Ord a => [a] -> a
base Prelude, base Data.List
maximum returns the maximum value from a list, which must be non-empty, finite, and of an ordered type. It is a special case of maximumBy, which allows the programmer to supply their own comparison function.
minimum :: Ord a => [a] -> a
base Prelude, base Data.List
minimum returns the minimum value from a list, which must be non-empty, finite, and of an ordered type. It is a special case of minimumBy, which allows the programmer to supply their own comparison function.
augment :: (forall b. (a -> b -> b) -> b -> b) -> [a] -> [a]
base GHC.Exts
A list producer that can be fused with foldr. This function is merely > augment g xs = g (:) xs but GHC's simplifier will transform an expression of the form foldr k z (augment g xs), which may arise after inlining, to g k (foldr k z xs), which avoids producing an intermediate list.
sortWith :: Ord b => (a -> b) -> [a] -> [a]
base GHC.Exts
The sortWith function sorts a list of elements using the user supplied function to project something out of each element
scanl1 :: (a -> a -> a) -> [a] -> [a]
base Prelude, base Data.List
scanl1 is a variant of scanl that has no starting value argument: > scanl1 f [x1, x2, ...] == [x1, x1 `f` x2, ...]
scanr1 :: (a -> a -> a) -> [a] -> [a]
base Prelude, base Data.List
scanr1 is a variant of scanr that has no starting value argument.
sortBy :: (a -> a -> Ordering) -> [a] -> [a]
base Data.List
The sortBy function is the non-overloaded version of sort.
nubBy :: (a -> a -> Bool) -> [a] -> [a]
base Data.List
The nubBy function behaves just like nub, except it uses a user-supplied equality predicate instead of the overloaded == function.
dropWhile :: (a -> Bool) -> [a] -> [a]
base Prelude, base Data.List
dropWhile p xs returns the suffix remaining after takeWhile p xs: > dropWhile (< 3) [1,2,3,4,5,1,2,3] == [3,4,5,1,2,3] > dropWhile (< 9) [1,2,3] == [] > dropWhile (< 0) [1,2,3] == [1,2,3]
filter :: (a -> Bool) -> [a] -> [a]
base Prelude, base Data.List
filter, applied to a predicate and a list, returns the list of those elements that satisfy the predicate; i.e., > filter p xs = [ x | x <- xs, p x]
takeWhile :: (a -> Bool) -> [a] -> [a]
base Prelude, base Data.List
takeWhile, applied to a predicate p and a list xs, returns the longest prefix (possibly empty) of xs of elements that satisfy p: > takeWhile (< 3) [1,2,3,4,1,2,3,4] == [1,2] > takeWhile (< 9) [1,2,3] == [1,2,3] > takeWhile (< 0) [1,2,3] == []
genericDrop :: Integral i => i -> [a] -> [a]
base Data.List
The genericDrop function is an overloaded version of drop, which accepts any Integral value as the number of elements to drop.
genericTake :: Integral i => i -> [a] -> [a]
base Data.List
The genericTake function is an overloaded version of take, which accepts any Integral value as the number of elements to take.
intersperse :: a -> [a] -> [a]
base Data.List
The intersperse function takes an element and a list and `intersperses' that element between the elements of the list. For example, > intersperse ',' "abcde" == "a,b,c,d,e"

Show more results