compacted() replaces the common compactMap { $0 } pattern, product() eliminates ...

@twostraws@mastodon.social

compacted() replaces the common compactMap { $0 } pattern, product() eliminates nested for-loops, and uniqued() removes duplicates from any sequence. Apple's Swift Algorithms package is full of small wins like these. hackingwithswift.com/articles/