Created
November 30, 2015 03:27
-
-
Save SlaunchaMan/e1677c50a88874512026 to your computer and use it in GitHub Desktop.
Initializing a Set without an array
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension Set { | |
init(items: Element...) { | |
self.init(items) | |
} | |
} | |
// From this: Set([object, object, object]) | |
// To this: Set(items: object, object, object) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment