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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.