Closed FrankKair closed 5 years ago
I just realized that Xcode 9.2 is being used, so I should use flatMap
instead.
While I appreciate the added simplicity, IIRC this line came up earlier and the consensus was to leave it be until Swift 5.0 is released, at which point we'll be interested in bumping the required Xcode version.
@jansol Ok, then 😊
Instead of using:
We could use
flatMap
to simplify these operations. It's both more legible and more efficient (1 loop against 3 loops).More info: https://developer.apple.com/documentation/swift/sequence/2950916-compactmap
Review Checklist