more concise version of Ox.range

This commit is contained in:
rlx 2012-03-29 10:19:42 +00:00
parent ab2e5ecda0
commit 44ec0d1ecb

View file

@ -75,12 +75,10 @@ Ox.range <f> Python-style range
[-1, -1.5]
@*/
Ox.range = function() {
var args = Ox.makeArray(arguments),
arr = [];
args.push(function(i) {
var arr = [];
Ox.loop.apply(null, Ox.merge(Ox.makeArray(arguments), function(i) {
arr.push(i);
});
Ox.loop.apply(null, args);
}));
return arr;
};