import { Enumerable } from "https://deno.land/x/proc@0.22.1/mod.ts";
Executes a user-supplied "reducer" callback function on each element of the array, in order, passing in the return value from the calculation on the preceding element. The final result of running the reducer across all elements of the array is a single value.
Executes a user-supplied "reducer" callback function on each element of the array, in order, passing in the return value from the calculation on the preceding element. The final result of running the reducer across all elements of the array is a single value.
Parameters
A function to execute for each element in the array.
Its return value becomes the value of the accumulator parameter on the next invocation of reduceFn
.
For the last invocation, the return value becomes the return value of reduce()
.
A value to which accumulator is initialized the first time the callback is called.