Skip to content

Instantly share code, notes, and snippets.

@bpceee
Created October 15, 2014 03:51
Show Gist options
  • Save bpceee/5577f633dd9feb9d1c4d to your computer and use it in GitHub Desktop.
Save bpceee/5577f633dd9feb9d1c4d to your computer and use it in GitHub Desktop.
partial function
function partial(f) {
var args = Array.prototype.slice.call(arguments, 1)
return function() {
var remainingArgs = Array.prototype.slice.call(arguments)
return f.apply(null, args.concat(remainingArgs))
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment