Skip to content

Instantly share code, notes, and snippets.

@alexj70
Last active April 22, 2017 19:55
Show Gist options
  • Save alexj70/9176b491c17b0a279917a7f957461012 to your computer and use it in GitHub Desktop.
Save alexj70/9176b491c17b0a279917a7f957461012 to your computer and use it in GitHub Desktop.
for case where
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