accumulate
core-api
function
boot.janet on line 1124, column 1
(accumulate f init x)
Similar to `reduce`, but accumulates successive results of applying
`f` into a new array. The last element in the array is what would
be the return value from `reduce`. The `init` value is not added
directly as the first value of the new array, i.e. the returned
array will have the same number of elements as `x`.
`x` can be a bytes, indexed, dictionary, fiber, or abstract type
with suitable `get` and `next` methods.