Skip to content

Commit

Permalink
Merge rkatik/uncurry-this into master
Browse files Browse the repository at this point in the history
  • Loading branch information
kriskowal committed Jan 27, 2013
2 parents 78131d7 + a430971 commit 8324721
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions q.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,19 +116,12 @@ if (typeof process !== "undefined") {
// hard-to-minify characters.
// See Mark Miller’s explanation of what this does.
// http://wiki.ecmascript.org/doku.php?id=conventions:safe_meta_programming
var uncurryThis;
// I have kept both variations because the first is theoretically
// faster, if bind is available.
if (Function.prototype.bind) {
var Function_bind = Function.prototype.bind;
uncurryThis = Function_bind.bind(Function_bind.call);
} else {
uncurryThis = function (f) {
return function () {
return f.call.apply(f, arguments);
};
var uncurryThis = function (f) {
var call = Function.call;
return function () {
return call.apply(f, arguments);
};
}
};

var array_slice = uncurryThis(Array.prototype.slice);

Expand Down

0 comments on commit 8324721

Please sign in to comment.