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 started by explaining function definition and usage in detail by giving examples for parameter and return types. Then it continued to cover FP-related concepts such as pure, first-class, higher-order, and nested functions. Finally, it covered function composition, closures, currying, and memoization.

At this point, we should be familiar with different types of functions and closures and their usages. In the following chapter, we will cover types and explore the concept of value types versus reference types. Also, we will look at value type characteristics in detail and cover type equality, identity, and casting.

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