Summary
In this chapter, you studied how to group statements together into functions. You learned how to use custom argument labels, functions inside other functions, functions as return types, and functions as parameters. This will be useful later when you need to accomplish the same task at different points in your program.
You also learned how to create closures. This will be useful when you need to pass around blocks of code within your program.
In the next chapter, you will study classes, structures, and enumerations. Classes and structures allow for the creation of complex objects that can store state and behavior, and enumerations can be used to limit the values that can be assigned to a variable or constant, reducing the chances for error.