Swift, as a highly protocol-oriented programming language, is chock-a-block with a multitude of protocols in its standard library. In this series, I hope to discover & learn more about some of them.
One of the most powerful parts of Swift is its support for Generics. Using Generics, you can write code that is type-agnostic, meaning less code duplication.
A protocol in Swift is generic when it does not enforce types in (some or all of) its variables and functions, on types that conform to it. Different conforming types can then implement the protocol in ways that’re relevant or convenient for them.