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

This chapter explained the enumeration definition and usage. We covered associated and raw values and an introduction to the concept of algebraic data types. We explored some examples to cover the sum, product, and recursion types. We will use the concept of algebraic data types in Chapter 8, Functional Data Structures when we talk about functional data structures. In this chapter, we explored patterns such as wildcard, value-binding, identifier, tuple, enumeration case, optional, type casting, and expressions, along with related pattern matching examples.

The next chapter will cover generics and associated type protocols that are very useful tools in functional programming, generic programming, and protocol-oriented 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