Creates a new set from a finite sequence of items.
- Xcode 10.2+
- Swift Standard Library
The elements to use as members of the new set.
Use this initializer to create a new set from an existing sequence, for example, an array or a range.
This initializer can also be used to restore set methods after performing sequence operations such as
map(_:) on a set. For example, after filtering a set of prime numbers to remove any below 10, you can create a new set by using this initializer.