Getting Started with Functional Programming in Swift

Getting onto the functional programming bandwagon needs a mindset shift, and changing our mindset is not an easy task as it takes a considerable amount of time to master a paradigm such as object-oriented programming. It needs a thorough approach, but it should also be easy to grasp. That is why we will be introduced to functional programming paradigms first, before going through each topic in detail.

This chapter introduces immutability, pattern matching, closures, as well as pure, first-class, and higher-order functions with Swift. Although all the topics in this chapter will be covered in detail in upcoming chapters, it is going to be helpful to have a broad view of the paradigms. In ...

Get Swift Functional Programming - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.