Inserts the given element into the set unconditionally.
Required. Default implementation provided.
- Xcode 8.0+
- Swift Standard Library
An element to insert into the set.
For ordinary sets, an element equal to
new if the set already contained such a member; otherwise,
nil. In some cases, the returned element may be distinguishable from
new by identity comparison or some other means.
For sets where the set type and element type are the same, like
Option types, this method returns any intersection between the set and
nil if the intersection is empty.
If an element equal to
new is already contained in the set,
new replaces the existing element. In this example, an existing element is inserted into
class, a set of days of the week.