more concise version of Ox.range
This commit is contained in:
parent
ab2e5ecda0
commit
44ec0d1ecb
1 changed files with 3 additions and 5 deletions
|
@ -75,12 +75,10 @@ Ox.range <f> Python-style range
|
||||||
[-1, -1.5]
|
[-1, -1.5]
|
||||||
@*/
|
@*/
|
||||||
Ox.range = function() {
|
Ox.range = function() {
|
||||||
var args = Ox.makeArray(arguments),
|
var arr = [];
|
||||||
arr = [];
|
Ox.loop.apply(null, Ox.merge(Ox.makeArray(arguments), function(i) {
|
||||||
args.push(function(i) {
|
|
||||||
arr.push(i);
|
arr.push(i);
|
||||||
});
|
}));
|
||||||
Ox.loop.apply(null, args);
|
|
||||||
return arr;
|
return arr;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue