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