List.foldl

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

Specs

foldl([elem], acc, (elem, acc -> acc)) :: acc when elem: var, acc: var

Folds (reduces) the given list from the left with a function. Requires an accumulator.

Examples

iex> List.foldl([5, 5], 10, fn x, acc -> x + acc end)
20

iex> List.foldl([1, 2, 3, 4], 0, fn x, acc -> x - acc end)
2