Skip to content

Instantly share code, notes, and snippets.

@jkempff
Created July 2, 2013 16:48
Show Gist options
  • Save jkempff/5910993 to your computer and use it in GitHub Desktop.
Save jkempff/5910993 to your computer and use it in GitHub Desktop.
Schönfinkelize
function schonfinkelize (fn) {
var slice = Array.prototype.slice,
defaults = slice.call(arguments,1);
return function () {
var new_args = slice.call(arguments),
args = defaults.concat(new_args);
return fn.apply(null,args);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment