JanetDocsI'm feeling luckyGithub sign in

accumulate



    function
    boot.janet on line 829, 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. Returns a new array.


1 exampleSign in to add an example
Loading...
(reduce     + 1 [2 3 4])  # -> 10
(accumulate + 1 [2 3 4])  # -> @[3 6 10]
cellularmitosis