Book Image

Swift Cookbook

By : Cecil Costa, Cecil Costa
Book Image

Swift Cookbook

By: Cecil Costa, Cecil Costa

Overview of this book

Table of Contents (18 chapters)
Swift Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 3. Using Structs and Generics

In this chapter, we will cover the following topics:

  • Creating an exam app

  • Checking the right answer

  • Avoiding copying of structs

  • Creating a generic array initializer

  • Creating a priority list

  • Creating a protocol for the priority queue