diff options
Diffstat (limited to 'lib/utils.js')
-rw-r--r-- | lib/utils.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/utils.js b/lib/utils.js index 6ac68bbd..da82a140 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -113,8 +113,8 @@ function return_true() { return true; } function return_this() { return this; } function return_null() { return null; } -var MAP = (function() { - function MAP(a, f, backwards) { +var List = (function() { + function List(a, f, backwards) { var ret = [], top = [], i; function doit() { var val = f(a[i], i); @@ -149,14 +149,14 @@ var MAP = (function() { } return top.concat(ret); } - MAP.at_top = function(val) { return new AtTop(val) }; - MAP.splice = function(val) { return new Splice(val) }; - MAP.last = function(val) { return new Last(val) }; - var skip = MAP.skip = {}; - function AtTop(val) { this.v = val } - function Splice(val) { this.v = val } - function Last(val) { this.v = val } - return MAP; + List.at_top = function(val) { return new AtTop(val); }; + List.splice = function(val) { return new Splice(val); }; + List.last = function(val) { return new Last(val); }; + var skip = List.skip = {}; + function AtTop(val) { this.v = val; } + function Splice(val) { this.v = val; } + function Last(val) { this.v = val; } + return List; })(); function push_uniq(array, el) { |