Summing It Up
I’ve spent the entire chapter discussing functions and their use. Toward the end, you learned about closures and how they are essentially nameless functions that can be passed around to do useful work. As I indicated earlier, functions and closures are the foundations on which Swift apps are written. They appear everywhere and are an integral part of the development process. Knowing how they work and when to use them is a skill you will acquire over time.
In fact, there are even more things about functions and closures that I didn’t touch on in this chapter. There’s no need to overload you on every possible feature they have; I’ll cover those extras later in the book. For now, you have enough of the basics to start doing useful programming.
Also, feel free to work with the code in the playground for this chapter. Change it, modify it, add to it, and make a mess of it if you want. That’s what playgrounds are for, after all!