union(_:)
Returns a new set with the elements of both this set and the given cursor.
func union(_ cursor: some Cursor<Element>) throws -> Set<Element>
Parameters
- cursor
A cursor of elements.
Returns
A new set with the unique elements of this set and cursor
.
If the set already contains one or more elements that are also in the cursor, the existing members are kept. If the cursor contains multiple instances of equivalent elements, only the first instance is kept.