Last active
March 1, 2017 12:46
-
-
Save TheNamesJamesW/7eb18cb44eaa9d2febfaf8829c3062a1 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
// For-in but only enumerate values of a certain type | |
let things = [1, 2, "three"] | |
for case let number as Int in things { | |
print(number) | |
} | |
// Prints: | |
// 1 | |
// 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment