Swift sequences: The art of being lazy – John Sundell – Medium
medium.comWhen dealing with smaller datasets, where each member isn’t very expensive to construct, this is not a problem. However, when this is not true, you can get some pretty big performance benefits from implementing your own lazily evaluated sequence, instead of using an array.
Read more...