last
Callable
Type parameters
- T
The element type.
Parameters
xs: Traversable<T, unknown>
The Traversable to take the first element from.
Returns Maybe<T>
The last element if it exists, otherwise
Nothing
.- T
The element type.
The Traversable to take the first element from.
The last element if it exists, otherwise Nothing
.
Take the Traversable and return the last element.
The function evaluates the Traversable and converts it into an array.
Example