Fuzion Logo
flang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.

sum

🌌sum

§sum<U, T>(n U, l Sequence<sum.T>)
 => 
T
:
Object

sum -- generic sum of the elements of a Sequence of numeric.

This allows summing the elements of a list, as in

l := [1,2,3]
say (sum i32 l) # '6'