function
boot.janet on line 1011 , column 1
(accumulate f init ind )
Similar to `reduce` , but accumulates intermediate values into an
array. The last element in the array is what would be the return
value from `reduce` . The `init` value is not added to the array
(the return value will have the same number of elements as `ind` ).
Returns a new array.
(reduce string "ha" ["ha" "ha" "ha" "ha" ]) # => "hahahahaha"
(accumulate string "ha" ["ha" "ha" "ha" "ha" ]) # => @["haha" "hahaha" "hahahaha" "hahahahaha"]
(reduce 1 [2 3 4 ]) # -> 10
(accumulate 1 [2 3 4 ]) # -> @[3 6 10]