CompactMap and flatMap, what are the differences and when do you use each? Swift 4.1 introduced this new method with the proposal 0187: Introduce Filtermap to gain more clarity in flatMap use cases.
Swift 4.2 is a major release and shipped with Xcode 10. It comes with a lot of code improvements for which the best way to start is to watch the WWDC 2018: What’s New in Swift session. Some of the improvements are easy to implement in your existing code.