Summary

This chapter just scratches the surface of using functions in Swift. You learned most of what there is to learn syntactically, but there is more to come with the possibilities of implementation. Now that you know all the different ways to use functions in Swift, it is now time to start experimenting and implementing. Functions are one of the puzzle pieces of object-oriented programming, but you need more pieces to complete the picture. Next you will learn how to turn functions into methods of a class, struct, and enum. You will learn the basic building blocks of structuring code. When combined with classes, structs, and enums, functions become a part of that bigger object-oriented programming picture.

Get Learning Swift™ Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.