I\'m looking for a way to accomplish a certain task and that is, going from
jQuery.when.apply( null, promiseArray ).done(...)
to
This should work:
when = Function.prototype.apply.bind( $.when, null);
You just bind (or curry, if you prefer) the first argument of .bind and fix it to null.
.bind
null
Fiddle.