Currently, several of the combinators have, buried within them a call to .apply(null, ...). For example:
fnull: function(fun /*, defaults */) {
var defaults = _.rest(arguments);
return function(/*args*/) {
var args = _.toArray(arguments);
var sz = _.size(defaults);
for(var i = 0; i < sz; i++) {
if (!existy(args[i]))
args[i] = defaults[i];
}
return fun.apply(null, args);
};
}
This works perfectly for standalone functions but cannot be used on methods because it erases the current object context. If fun.apply(null, args) is replaced with fun.apply(this, args), fnull (and others with similar calls to .apply) can be used with methods as well as with standalone functions.