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 covered the concept of functional data structures and explored examples of data structures implemented in a functional way, such as Semigroups, Monoids, BST, linked lists, stacks, and lazy lists.

Even though none of the data structures are complete, they serve as structures that present FP paradigms and techniques. It would also be beneficial to examine the performance of any of these data structures.

In the following chapter, we will cover the importance of immutability by examining its benefits. We will also examine an example of a mutable versus an immutable implementation, as well as the means to get and set immutable objects in a functional way, such as copy constructors and lenses.

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