Listing all cases in an Swift enum

Swift enumerations allows us to define a common type for a group of related values, and are a great way to keep our code organized and type-safe. However, one feature missing is the ability to easily list all available cases for an enum. In this post, Bartosz Polaczyk shows us how we can define our enums in such a way that that this is possible. Very useful.