The methods you supplied use the index and array values in the callback function to the reduce method. However, they are not implemented and will always return 0 and the sliced array respectively (instead of the actual index and the entire inital values array).
One way I found to solve this is use a "static property"
reduce(arr, reducer, init) {
...
...
...
reduce.index = typeof reduce.index === 'number' ? reduce.index + 1: 0;
reduce.values = reduce.values || arr;
...
...
...
init = reducer(init, curr, reduce.index, reduce.values);
...
The methods you supplied use the index and array values in the callback function to the reduce method. However, they are not implemented and will always return 0 and the sliced array respectively (instead of the actual index and the entire inital values array).
One way I found to solve this is use a "static property"