remove Ox.merge
This commit is contained in:
parent
f6b06d0975
commit
64c01e385d
1 changed files with 0 additions and 25 deletions
|
@ -365,31 +365,6 @@ Ox.indexOf = function(arr) {
|
||||||
};
|
};
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*@
|
|
||||||
Ox.merge <f> Merges an array with one or more other arrays
|
|
||||||
For convenience, literals are treated as arrays with one element
|
|
||||||
(arr, arr[, arr[, ...]]) -> <a> Array
|
|
||||||
> Ox.merge([1], [2, 3, 2], [1])
|
|
||||||
[1, 2, 3, 2, 1]
|
|
||||||
> Ox.merge(1, [2, 3, 2], 1)
|
|
||||||
[1, 2, 3, 2, 1]
|
|
||||||
@*/
|
|
||||||
// FIXME: [].concat exists!
|
|
||||||
Ox.merge = function(arr) {
|
|
||||||
arr = Ox.makeArray(arr);
|
|
||||||
Ox.slice(arguments, 1).forEach(function(arg) {
|
|
||||||
arg = Ox.makeArray(arg);
|
|
||||||
if (arg.length < Ox.STACK_SIZE) {
|
|
||||||
arr.push.apply(arr, arg);
|
|
||||||
} else {
|
|
||||||
arg.forEach(function(val) {
|
|
||||||
arr.push(val);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return arr;
|
|
||||||
};
|
|
||||||
|
|
||||||
/*@
|
/*@
|
||||||
Ox.range <f> Python-style range
|
Ox.range <f> Python-style range
|
||||||
(stop) -> <[n]> range
|
(stop) -> <[n]> range
|
||||||
|
|
Loading…
Add table
Reference in a new issue