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. Have a look: https://www.hackingwithswift.com/articles/243/write-better-code-with-swift-algorithms
