Skip to content

Instantly share code, notes, and snippets.

@griffinmichl
Last active May 18, 2016 01:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save griffinmichl/749d250b117ae1ebd3d8f5f5c99699ad to your computer and use it in GitHub Desktop.
Save griffinmichl/749d250b117ae1ebd3d8f5f5c99699ad to your computer and use it in GitHub Desktop.
const iteratee = (elem, cb) => setTimeout(() => cb(null, elem*2), 100)
map([1,2,3], iteratee, (err, result) => {
if (err) {
console.log(err)
} else {
console.log(result)
}
})
// [2, 4, 6]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment