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



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 l) # '6'


NYI: the following code to get T's sum monoid does not work for l.isEmpty,
it should be something like

m := T.sum