concat
优质
小牛编辑
142浏览
2023-12-01
Creates a new sequence with all of the elements of this one, plus those of the given array(s).
Signature
Sequence.concat = function(var_args) { /*...*/ }
Sequence.concat = function concat(var_args) { return new ConcatenatedSequence(this, arraySlice.call(arguments, 0)); }
Name | Type(s) | Description |
---|---|---|
var_args | ...* | One or more VALUES (NULL, 2, 3]; var right = [4, 5, 6]; Lazy(left).concat(right) // sequence: [1, 2, 3, 4, 5, 6] Lazy(left).concat(Lazy(right)) // sequence: [1, 2, 3, 4, 5, 6] Lazy(left).concat(right, [7, 8]) // sequence: [1, 2, 3, 4, 5, 6, 7, 8] Lazy(left).concat([4, [5, 6]]) // sequence: [1, 2, 3, 4, [5, 6]] Lazy(left).concat(Lazy([4, [5, 6]])) // sequence: [1, 2, 3, 4, [5, 6]] |