We are all familiar with collection types. Array, probably, the most common way to represent collection of items. We can easily iterate through by using for loop.
Another Swift collections representations, like Dictionary, Set and others has one important thing in common: all of them are adopting SequenceType protocol. We can create custom sequences for very wide range of purposes. It can be finite or inifinite sequence. For instance, we may need the ‘powers of 2’ sequence or similar.