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 understood how to define and use Generics. We also understood the types of problem Generics solve. Then we explored type constraints, Generic data structures, associated type protocols, and type erasure with examples.

Generics are great tools that, once you are accustomed to them, make your code more flexible, useful, and robust, so we will use them a lot in the rest of the book.

In the following chapter, we will be introduced to some category theory concepts, such as Functors, Applicative Functors, and Monads. We will also explore higher-order functions such as map, filter, and reduce.

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