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.
You now know how to create and use functions, nested functions, functions as return types, and functions as arguments. You also know how to create and use closures.
In the next chapter, we 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...