Skip to content

Commit

Permalink
Revert "Variables renaming in function.js for readability."
Browse files Browse the repository at this point in the history
This reverts commit 160f85f.
  • Loading branch information
tobie committed Oct 1, 2008
1 parent ba30188 commit f788cf7
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/lang/function.js
Expand Up @@ -19,28 +19,28 @@ Object.extend(Function.prototype, (function() {
}

function bind(context) {
if (arguments.length < 2 && Object.isUndefined(context)) return this;
var __method = this, curried = slice.call(arguments, 1);
if (arguments.length < 2 && Object.isUndefined(arguments[0])) return this;
var __method = this, args = slice.call(arguments, 1);
return function() {
var args = merge(curried, arguments);
return __method.apply(context, args);
var a = merge(args, arguments);
return __method.apply(context, a);
}
}

function bindAsEventListener(context) {
var __method = this, curried = slice.call(arguments, 1);
var __method = this, args = slice.call(arguments, 1);
return function(event) {
var args = update([event || window.event], curried);
return __method.apply(context, args);
var a = update([event || window.event], args);
return __method.apply(context, a);
}
}

function curry() {
if (!arguments.length) return this;
var __method = this, curried = slice.call(arguments, 0);
var __method = this, args = slice.call(arguments, 0);
return function() {
var args = merge(curried, arguments);
return __method.apply(this, args);
var a = merge(args, arguments);
return __method.apply(this, a);
}
}

Expand All @@ -60,17 +60,17 @@ Object.extend(Function.prototype, (function() {
function wrap(wrapper) {
var __method = this;
return function() {
var args = update([__method.bind(this)], arguments);
return wrapper.apply(this, args);
var a = update([__method.bind(this)], arguments);
return wrapper.apply(this, a);
}
}

function methodize() {
if (this._methodized) return this._methodized;
var __method = this;
return this._methodized = function() {
var args = update([this], arguments);
return __method.apply(null, args);
var a = update([this], arguments);
return __method.apply(null, a);
};
}

Expand Down

0 comments on commit f788cf7

Please sign in to comment.