Chapter 6. Functions and Closures

Topics in This Chapter

Image 6.1 Functions

Image 6.2 Closures

Image 6.3 Functional Programming Patterns

Image Exercises

Functions in Swift provide a flexible way to break your code into small pieces. The parameters and return value of a function give every function a type. Because a function has a type, it can be treated like any other ...

Get Swift for the Really Impatient now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.