Created
August 15, 2020 17:15
-
-
Save jnewc/536a35168f4d13495e65d0323df99e9e to your computer and use it in GitHub Desktop.
More natural (fight me) OptionSet syntax for Swift
This file contains 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
func |<T>(_ first: T, _ second: T) -> T where T: OptionSet { | |
return first.union(second) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment