This is the code for the class demo. Open up the OOPSwift workspace to have all the playgrounds together. For POP, we started with the Protocols and Extensions
playground and then went to POP
(The Doctors and Surgeons
provides more examples if you want to look at that as well.)
In addition, I created some more playgrounds to illustrate functional programming concepts. Of particular note is the flatmap_examples
where we use compactMap()
to unwrap optionals safely and toss out any nil values automatically.
Qapla'