Lazy collections are similar to a regular collection but change the way how modifiers like map, filter, and reduce are processed. In my experience, they haven’t got as much attention as they should as they can be more performant in certain cases. You might be more familiar with lazy vars, but have you used the …
collections
Performance, functional programming and collections in Swift
Functional programming is often done in Swift and so easy that it could easily hit performance. Iterating over large collections and performing actions like filter or map is common and should be used wisely. Performance is often decreasing when these methods are combined, like a filter followed by first. A list of best practices. Prefer …