Creates a new collection by concatenating the elements of a collection and a sequence.
SDK
- Xcode 10.0+
Framework
- Swift Standard Library
Declaration
Parameters
lhs
A range-replaceable collection.
rhs
A collection or finite sequence.
Discussion
The two arguments must have the same Element
type. For example, you can concatenate the elements of an integer array and a Range<Int>
instance.
The resulting collection has the type of the argument on the left-hand side. In the example above, more
has the same type as numbers
, which is [Int]
.