insert(contentsOf:at:)
Inserts the elements of a sequence into the collection at the specified position.
mutating func insert(contentsOf newElements: some Collection<Element>, at i: Index)
Parameters
- newElements
The new elements to insert into the collection.
- i
The position at which to insert the new elements.
index
must be a valid index of the collection.