TJ Usiyan: Functional Programming and Polymorphism basics in Swift – λC Winter Retreat 2017

Swift allows us to apply many techniques from functional programming but, at the end of the day, Swift is not meant to be a functional programming language. This point can make it tricky to learn and apply functional programming principles using the language. One approach is to eschew FP concepts altogether when using Swift. It doesn’t take much time to realize that this is not the correct approach. Use of closures as first class types, map and filterare all completely at home in Swift. Clearly, there are some concepts which work well in Swift.

In this session, we’ll introduce fundamental functional programming concepts using swift, explain and explore the ways in which Swift is not meant to adhere to these, and try to define some basic guidelines for successfully using FP ideas in Swift. Attendees should have the latest Xcode installed, should understand what variables and types are in a general sense, and should be able to type quickly (more quickly than ‘hunt and peck’).