Created
November 9, 2015 19:14
-
-
Save Igor-Palaguta/c735964f6351e984d4a1 to your computer and use it in GitHub Desktop.
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
enum Choice { | |
case A | |
case B | |
case C | |
} | |
func printChoice(choice: Choice, flag: Bool) { | |
switch choice { | |
case .A, .B, .C where flag: | |
print("true") | |
default: | |
print("false") | |
} | |
} | |
printChoice(.A, flag: false) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
prints true