Blog Archives

Swift 5 – it’s alive!

It’s been a couple of weeks now since Swift 5 has arrived, with a bunch of features, such as: ABI stability source compatibility isMultiple – a fancy technique for checking if a number is a multiple of another number. Dictionary

Tagged with:
Posted in Swift

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