Enum.sum

You're seeing just the function sum, go back to Enum module for more information.

Specs

sum(t()) :: number()

Returns the sum of all elements.

Raises ArithmeticError if enumerable contains a non-numeric value.

Examples

iex> Enum.sum([1, 2, 3])
6

iex> Enum.sum(1..10)
55

iex> Enum.sum(1..10//2)
25