Kodeco Forums

Pattern Matching in Swift

In this pattern matching tutorial you'll learn how you can use pattern matching with tuples, types, wildcards, optionals, enumeration, and expressions.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/1008-pattern-matching-in-swift
1 Like

Thanks for really nice tutorial. Could you let me know if there is a way for me to favorite a tutorial in ray wenderlich so that I can go back to it easily?

Use add to bookmark, reading lost in Safari or favourites in firefox

Nice tutorial. But suppose the Day has a attribute named ChineseName to get the Chinese name of the Day. I have to switch Day to get different names like order. It will be lower efficient if a Day contains many attributes when getting attributes. Any good ways?

Where can I find the tutorials.json file? It’s not being downloaded with the playground file.

It’s actually all bundled up in the playground’s Resources folder. :]

You can also find its content in the sandbox as well.

Thank you - I’m learning playgrounds has a side panel view.

I often pass over tuples because they seem so basic, but there were some really cool things you did in this tutorial! Thank you! I thoroughly enjoyed it.

Thank you - much appreciated - really glad you enjoyed it! :]

This tutorial is more than six months old so questions regarding it are no longer supported for the moment. We will update it as soon as possible. Thank you! :]