Generics are used extensively within the Swift standard library and they allow the Swift collection types to store instances of any type. To see this, let's go to http:// swiftdoc.org/ and look at the Array type. If you click on the Array link from the main page, you will see the documentation on the array type. The documentation looks like this:
At the top of the page, we see that the array type is defined as struct Array<Element>. This tells us that the array type is implemented as a generic value type using a structure. If we now look at the set, we will see that it is also implemented as a generic structure.