Summary
In this chapter, we covered two more tools that can improve an application's performance: lazy loading and lazy execution techniques. First, we explained why it's important to make code behave lazily, when to do so, and in which way it can be implemented. Next, we showed you the lazy loading feature built into the Swift language and how to use it with global variables, type properties, and lazy stored properties.
In the rest of the chapter, we covered how to make a collection behave lazily. We used many functions with a lazy collection and showed the differences between a collection and a sequence.
In the next and final chapter, Discovering All of the Underlying Swift Power, we will take a look at some more advanced tools that will help you analyze the power of Swift, and go through a quick recap of what you learned throughout the book.