Description

Copyright 2015

Edition: 1st

Downloadable Video

ISBN-10: 0-13-438929-8

ISBN-13: 978-0-13-438929-5

Rather than writing separate code to perform identical tasks on different types (e.g., summing an Array of integers vs. summing an Array of floating-point values), generics enable you to write the code once and use placeholders to represent the type(s) of data to manipulate. In this lesson, you explore the motivation for generics in Swift and learn how to create your own generic functions, methods and types.