Last active
October 2, 2019 08:38
-
-
Save ianldgs/914c7c67969ddb62433601fc861480aa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const toSinglePromise = (acc, curr, o, arr) => arr = Promise.all(arr); | |
const toSinglePromise = (acc, curr, o, arr) => { | |
console.log('called', i+1, 'times') | |
return arr = Promise.all(arr) | |
}; | |
await [Promise.resolve('a'), Promise.resolve('b')].reduce(toSinglePromise) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment