Swift Generics
Generics
Type safety, MemoryWrap Common Algorithms in MethodsSetting the Element TypeConstraining IndexUsing Count in a Generic ContextChoosing When to Define Customization PointsBidirectionalCollectionFisher-Yates ShuffleCollection Protocol HierarchySlicing CollectionsRange StructuresRange conditionally conforms to RandomAccessCollectionCountableRange is a convenient alias for Ranges that are CollectionsRequired initializers must be implemented by all subclasses