Part (II) : What are .map , .compactMap and .flatMap in Swift
It's simple ! Let's start with :
.map :
The whole idea is about mapping collection elements , do something on them and then return the same-sized array of them !
So, here we are creating a new array from the other array . It is done with an O(n) comp...
swiftycode.hashnode.dev7 min read