math sum for math

Returns the sum of a list of numbers or of each column in a table.

Signature

> math sum {flags}

Input/output types:

inputoutput
list<duration>duration
list<filesize>filesize
list<number>number
rangenumber
tabletable

Examples

Sum a list of numbers

> [1 2 3] | math sum
6

Get the disk usage for the current directory

> ls | get size | math sum