accumulate function
Running totals of a list.
How to write it
accumulate(list)
- list
- The list. Takes a list.
Examples
accumulate([1, 2, 3])In the solver,
Open in the solveraccumulate([1, 2, 3])gives[1, 3, 6].
Related functions
- append
A list with an element added at the end.
- union
The elements in any of some lists, each once, in order.
- apply
Replace the head of an expression, or the brackets of a list, with a function.
- total
Sum of the elements of a list.
- complement
The elements of a list that are in none of the others.
- thread
Apply a function to corresponding elements of lists.