"Returns a promise containing the reduced result from the provided function"
$ npm install promise.reduce --save
var map = require('promise.reduce')
var conat = (total, current) => Promise.resolve(total + current)
reduce([
'a',
'b',
Promise.resolve('c')
], concat).then((result) => {
console.log(result) // 'abc'
})
Returns a promise containing the reduced result of the promisified mappingFn on its elements. Rejection occurs if any supplied promises reject.
A sequence of promises or instanceof Iterable
A mapping function that returns a promise
The initial value used in the reduction invocation