Generics in iOS Explained With a Simple Example
Generic code enables you to write flexible, reusable functions and types that can work with any type.

In real life you can think about a bag as an object that can hold different kind of products. If you go to a grocery store your bag can hold fruits, together with vegetables and other products.