cafeteria-prelude-0.1.0.0: Prelude subsets—take only what you want!

Safe HaskellSafe-Inferred
LanguageHaskell2010

Prelude.Source.Data.List

Synopsis

Documentation

foldl1 :: (a -> a -> a) -> [a] -> a

foldl1 is a variant of foldl that has no starting value argument, and thus must be applied to non-empty lists.

sum :: Num a => [a] -> a

The sum function computes the sum of a finite list of numbers.

product :: Num a => [a] -> a

The product function computes the product of a finite list of numbers.

maximum :: Ord a => [a] -> a

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

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.

lines :: String -> [String]

lines breaks a string up into a list of strings at newline characters. The resulting strings do not contain newlines.

words :: String -> [String]

words breaks a string up into a list of words, which were delimited by white space.

unlines :: [String] -> String

unlines is an inverse operation to lines. It joins lines, after appending a terminating newline to each.

unwords :: [String] -> String

unwords is an inverse operation to words. It joins words with separating spaces.