Abstract
In this chapter, we’re going to explore two of the most powerful elements of the Swift language: classes and closures. Classes are a neat way to group functions together, along with data, and be able to create integrated objects with “state.” While closures provide us with a flexible way to use functions, without the usual function overhead – that is, defining them thoroughly, naming them, declaring their arguments, etc.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2019 Yanis Zafirópulos
About this chapter
Cite this chapter
Zafirópulos, Y. (2019). Classes and Closures. In: Swift 4 Recipes. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-4182-0_6
Download citation
DOI: https://doi.org/10.1007/978-1-4842-4182-0_6
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-4181-3
Online ISBN: 978-1-4842-4182-0
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)