Skip to content

Instantly share code, notes, and snippets.

@juliomatcom
Last active February 28, 2018 10:12
Show Gist options
  • Save juliomatcom/661d9823af6c3ae94ef0ae50207e5b51 to your computer and use it in GitHub Desktop.
Save juliomatcom/661d9823af6c3ae94ef0ae50207e5b51 to your computer and use it in GitHub Desktop.
curry implementation
function curry(f) {
return function currify() {
const args = Array.prototype.slice.call(arguments);
return args.length >= f.length ?
f.apply(null, args) :
currify.bind(null, ...args)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment