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, functions as parameters, and the guard
statement. 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, 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, reducing the chances of error.
Learn more on Discord
To join the Discord community for this book – where you can share feedback, ask questions to the author, and learn about new releases – follow the QR code below...