# last function

The last element of a list.

## How to write it

### last(list)

**list**

The list. Takes a list.

## Examples

- $\displaystyle \operatorname{last}(\left[ 1, 2, 3 \right]) = 3$

  `last([1, 2, 3])`

  In the solver, `last([1, 2, 3])` gives `3`.

  [Open in the solver](https://hilberon.com/?q=last%28%5B1%2C%202%2C%203%5D%29)

## Related functions

- [length](https://hilberon.com/library/length)

  Number of elements in a list.
- [join](https://hilberon.com/library/join)

  Join lists into one.
- [list](https://hilberon.com/library/list)

  A list of the arguments.
- [intersection](https://hilberon.com/library/intersection)

  The elements that are in every one of some lists.
- [map](https://hilberon.com/library/map)

  Apply a function to every element of a list.
- [head](https://hilberon.com/library/head)

  The head of an expression: the name of the function it is a call of.

---
Source: https://hilberon.com/library/last
