Skip to content

Total

Sums the elements of a list.

$ wo 'Total[{1, 2, 3}]'
6

A level-0 spec leaves the expression untouched:

$ wo 'Total[{{1, 2}, {3, 4}}, {0}]'
{{1, 2}, {3, 4}}

An empty list totals to 0 at every positive level:

$ wo 'Total[{}, {2}]'
0