Generic Initializer

init(_:)

Creates a new instance of a collection containing the elements of a sequence. あるシーケンスの要素を含んでいるあるコレクションの新しいインスタンスを作成します。

Declaration 宣言

init<S>(_ elements: S) where S : Sequence, Element == S.Element

Parameters パラメータ

elements

The sequence of elements for the new collection. 新しいコレクションのための要素からなるシーケンス。

See Also 参照

Creating an Array 配列の作成