# total function

Sum of the elements of a list.

## How to write it

### total(list)

**list**

The list. Takes a list.

## Examples

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

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

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

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

## Related functions

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

  The elements in any of some lists, each once, in order.
- [thread](https://hilberon.com/library/thread)

  Apply a function to corresponding elements of lists.
- [accumulate](https://hilberon.com/library/accumulate)

  Running totals of a list.
- [tally](https://hilberon.com/library/tally)

  How often each element occurs: a list of element and count pairs.
- [append](https://hilberon.com/library/append)

  A list with an element added at the end.
- [take](https://hilberon.com/library/take)

  The first elements of a list.

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