Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
partial: function(bind, args) {
var self = this;
args = $splat(args);
return function() {
return self.apply(bind, args.concat($A(arguments)));
// function add(a, b) {return a + b;}
// add.partial(null, 1)(2) -> will return 3

This comment has been minimized.

Copy link

@eladkarako eladkarako commented Jul 18, 2018

modified variation┅︎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment