Last active
May 8, 2017 19:26
-
-
Save morozkin/61fe00e0f0cd5c305a433647eb95e40b to your computer and use it in GitHub Desktop.
PatternMatching1
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
switch 5 { | |
case 0...10: | |
print("Range contains value") | |
default: | |
break | |
} | |
if case 0...10 = 5 { | |
print("Range contains value") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment