:: [t] -> t package:rio

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.
O(1) First element
O(1) Last element
O(1) First element without checking if the vector is empty
O(1) Last element without checking if the vector is empty
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!"