(array, reducer, accumulator)
| 23 | * ); |
| 24 | */ |
| 25 | export async function reduce(array, reducer, accumulator) { |
| 26 | for (let i=0; i<array.length; i++) { |
| 27 | accumulator = await reducer(accumulator, array[i], i, array); |
| 28 | } |
| 29 | return accumulator; |
| 30 | } |
| 31 | |
| 32 | |
| 33 | /** Invoke an async transform function on each item in the given Array **in parallel**, |
no outgoing calls
no test coverage detected
searching dependent graphs…