I believe You are searching for curry:
Function.prototype.curry = function() {
var args = Array.prototype.slice.apply(arguments);
var that = this;
return function() {
return that.apply(null,
args.concat(Array.prototype.slice.apply(arguments)));
}
};
Use it like this:
new Request({ url:opts.uri, onSuccess: this.myfunc.curry('bob',
'sally').bind(this) }).send();
Didn't test it, hope there is no errors ;)
Robert
