Generics
Generics are one of my favorite features of Swift. Like Optional, it makes
your code safer to work with, makes your app have fewer crashes and
unexpected bahaviors, and at the end of the day, it makes your users
happier. It’s one of the core features of Swift that make it great language
to work with, and I think you’ll love it as well. Without further ado,
let’s get started!
Let’s say you want to define a struct that lets you have pairs of things.
Maybe we can call it Pair. (I recommend d