Last active
April 22, 2017 19:55
-
-
Save alexj70/9176b491c17b0a279917a7f957461012 to your computer and use it in GitHub Desktop.
for case where
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
print("Movies by C. Columbus only:") | |
for case let Media.movie(title, director, year) in mediaList where director == "Chris Columbus" { | |
print(" - \(title) (\(year))") | |
} | |
/* Output: | |
Movies by C. Columbus only: | |
- Harry Potter and the Philosopher's Stone (2001) | |
- Harry Potter and the Chamber of Secrets (2002) | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment