Swift provides a number of map methods to transform elements in Swift collections and
return the transformed data in a new Array. The transform is supplied in a trailing
closure to the map function. This article looks at Map, FlatMap and CompactMap on
collections in Swift as well as MapValues in Dictionary.