Skip to content

Instantly share code, notes, and snippets.

@danielyogel
Created October 23, 2014 17:35
Show Gist options
  • Save danielyogel/98f5b34abe0040ee579e to your computer and use it in GitHub Desktop.
Save danielyogel/98f5b34abe0040ee579e to your computer and use it in GitHub Desktop.
promises generators for in loop.
co(
for (var i in list) {
try {
yield promiseMeSomething(list[i]);
} catch (err) {
console.log(err.message);
}
})()
@danielyogel
Copy link
Author

_(list).map(yield promiseMeSomething)

does not work...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment