Fresh Swift
  • About
  • Tags
Fresh Swift

#lazycollection


Swift Tricks: Searching for Objects by Type

Performing operations such as map or flatmap on large collections can be expensive. Luckily, Swift provides lazy collections. Using a lazy collection, all operations are delayed until we actually need to access an element. In this post, TIm Ekl uses a lazy collection together with flatmap to efficiently find a specific type in an array of types.

Posted on May 24, 2017

#lazycollection  #flatmap 

 •  2021  •  Fresh Swift

Hugo v0.81.0 powered  •  Theme by Beautiful Jekyll adapted to Beautiful Hugo