:: [Int] -> Int

Number of elements
minimum value in a list
Calculate the multiplicity of a multiplet
length returns the length of a finite list as an Int. It is an instance of the more general genericLength, the result type of which may be any kind of number.
>>> length []
0

>>> length ['a', 'b', 'c']
3

>>> length [1..]
* Hangs forever *
Number of dimensions
A version specialized to lists to avoid errors such as taking length of Maybe [a] instead of [a]. Such errors are hard to detect, because the type of elements of the list is not constrained.
Extract the first element of a list, which must be non-empty.
>>> head [1, 2, 3]
1

>>> head [1..]
1

>>> head []
*** Exception: Prelude.head: empty list
WARNING: This function is partial. You can use case-matching, uncons or listToMaybe instead.
Extract the last element of a list, which must be finite and non-empty.
>>> last [1, 2, 3]
3

>>> last [1..]
* Hangs forever *

>>> last []
*** Exception: Prelude.last: empty list
WARNING: This function is partial. You can use reverse with case-matching, uncons or listToMaybe instead.
Extract the last element of a list, which must be finite and non-empty.
>>> last [1, 2, 3]
3

>>> last [1..]
* Hangs forever *

>>> last []
*** Exception: Prelude.last: empty list
Extract the first element of a list, which must be non-empty.
>>> head [1, 2, 3]
1

>>> head [1..]
1

>>> head []
*** Exception: Prelude.head: empty list
Utility function to go from a singleton list to it's element. Wether or not the argument is a singleton list is only checked in debug builds.
Version of modes without a Data context, only to be used within cmdArgsQuote.
Version of enum without a Data context, only to be used within cmdArgsQuote.
Extract the first element of a list, which must be non-empty.
Extract the last element of a list, which must be finite and non-empty.
Extract the last element of a list, which must be finite and non-empty.
>>> last [1, 2, 3]
3

>>> last [1..]
* Hangs forever *

>>> last []
Exception: Prelude.last: empty list
Extract the first element of a list, which must be non-empty.
>>> head [1, 2, 3]
1

>>> head [1..]
1

>>> head []
Exception: Prelude.head: empty list
Fold a list using the monoid. For most types, the default definition for mconcat will be used, but the function is included in the class definition so that an optimized version can be provided for specific types.
>>> mconcat ["Hello", " ", "Haskell", "!"]
"Hello Haskell!"
Fold a list using the monoid. For most types, the default definition for mconcat will be used, but the function is included in the class definition so that an optimized version can be provided for specific types.