const reduceP = async (fn, identity, listP) => { const values = await Promise.all(listP) return values.reduce(fn, identity) }
let total = 0 while (listP.length > 0) { total += await listP.pop() }