Creates a new instance of a collection containing the elements of a sequence.
SDK
- Xcode 8.3+
Framework
- Swift Standard Library
Declaration
Parameters
elements
The sequence of elements for the new collection.
Creates a new instance of a collection containing the elements of a sequence.
SDK
Framework
elements
The sequence of elements for the new collection.
init()
Creates a new, empty array.
init<S>(S)
Creates an array containing the elements of a sequence.
init(repeating: Element, count: Int)
Creates a new array containing the specified number of a single, repeated value.