This function is designed to return the sum of a list of values or the sum of a range in a list of values.
sum(List) → number This function designed to calculate the sum of a list of numeric values or elements. |
sum(List of list, start index, end index) → number This function designed to calculate the sum of the values between given indices in a list of numeric values or elements. |
Example:
| ||
| ||
As demonstrated, sumList returns the total of List1 while sumRangeList returns the sum of values between 5-6th indices of List1. | ||
To view this example in the library, see (https://openbrim.org/app/?incubator=1&author=ParamML_Examples_OpenBrIM+Platform&obj=objidqokstqo0bi25myjlp2zo2 ) |