Skip to content

Instantly share code, notes, and snippets.

@AaronFlower
Created November 30, 2017 16:07
Show Gist options
  • Save AaronFlower/d32ec248f09c211edd34d2e42321be87 to your computer and use it in GitHub Desktop.
Save AaronFlower/d32ec248f09c211edd34d2e42321be87 to your computer and use it in GitHub Desktop.
javascript currying
function add (a, b) {
return a + b
}
foo = [10, 20, 30, 40]
bar = foo.map(add.bind(null, 5))
console.log(bar)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment