Array.accumulate()
Jump to navigation
Jump to search
Array.accumulate(FromTotal)
Accumulates the numbers by row and then by column sequentially. Starts from FromTotal.
[[1,3,4],[2,3,4]].accumulate(0)
1 | 4 | 8 |
10 | 13 | 17 |
if FromTotal is not defined, it concatenates each column and then concats for each of the subsequent row.
[[1,3,4],[2,3,4],[4,5,6]].accumulate()
1 | 3 | 4 |
1,3,42 | 1,3,423 | 1,3,4234 |
1,3,41,3,42344 | 1,3,41,3,423445 | 1,3,41,3,4234456 |