Sum
Revision as of 16:26, 17 March 2020 by 71.226.33.30 (talk) (Created page with "<c>sum</c> returns the total of all elements in a list, or all values in a map. === Arguments === {| class="wikitable" |- ! Parameter Name !! Default Value !! Meaning |- | '...")
sum
returns the total of all elements in a list, or all values in a map.
Arguments
Parameter Name | Default Value | Meaning |
---|---|---|
self | list or map | object to sum |
Example
range(3).sum // returns 6 (3 + 2 + 1 + 0)