O'Reilly logo

Swift Functional Programming - Second Edition by Dr. Fatih Nayebi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summary

In this chapter, we started by exploring the concept of immutability. We looked into its importance and benefits with examples. Then we looked at cases for mutability and went through an example to compare mutability and immutability effects on our code.

Finally, we explored the means to get and set immutable objects in a functional way, such as copy constructors and lenses.

In the following chapter, we will be introduced to OOP, protocol-oriented programming (POP), and Functional Reactive Programming (FRP). Then, we will explore the concept of mixing OOP and FP paradigms, in other words, object functional programming.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required