Design Patterns in Swift: State Pattern

This post from Dejan Agostini describes what the State pattern is, and shows us how to implement it in Swift using a simple example.