Created
April 23, 2019 16:00
-
-
Save rayfix/bc50426a3852f4f63d0f49cf55841c33 to your computer and use it in GitHub Desktop.
Unknown cases
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
| enum Coin { | |
| case heads | |
| case tails | |
| var isHeads: Bool { | |
| switch self { | |
| case .heads: | |
| return true | |
| case .tails: | |
| return false | |
| @unknown default: | |
| return false | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment