From f788cf7048b906cac7c0b0c17d352cbab781bae4 Mon Sep 17 00:00:00 2001 From: Tobie Langel Date: Wed, 1 Oct 2008 15:06:03 +0200 Subject: [PATCH] Revert "Variables renaming in function.js for readability." This reverts commit 160f85f51840fb69d116a3402a6a801a54205ad7. --- src/lang/function.js | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/lang/function.js b/src/lang/function.js index 31d78e4..df2f737 100644 --- a/src/lang/function.js +++ b/src/lang/function.js @@ -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); } } @@ -60,8 +60,8 @@ 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); } } @@ -69,8 +69,8 @@ Object.extend(Function.prototype, (function() { 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); }; }