Skip to content

Glossary: Swift Basics

generics

Also written: generic

Code that works for many types at once, instead of being written separately for each type. Protocols are often combined with generics so one piece of code can handle any type that meets certain requirements.

Where the book teaches it

Related terms

protocol