Blog Archives

flatMap vs compactMap

In Swift 4.1, the flatMap function was divided into two functions. One kept the same name: flatMap This method flattens a sequence. Let’s say we have a two-dimensional array: We can use the flatMap higher order function to ‘flatten’ this

Tagged with: , ,
Posted in Swift

Swift – a history of the inspiration for ‘new’ concepts!

In studying Swift initially, I was quite interested to read about concepts that I wasn’t familiar with, and curious to know if these were brand new concepts invented by excited Apple engineers, or if they were inspired¬†from other other languages.

Tagged with: , , ,
Posted in Swift