Optional is a fundamental type in Swift. While it’s almost everywhere, most developers don’t use it to the full extent or even use it in a wrong way. Optional binding opposes DRY principle and introduces unneeded conditionals.
In this multipart series we’ll discuss what
Optional really is, how to use it correctly and apply some advanced stuff in order to create convenient functional eDSL for
Swift brings lots of opportunities to iOS development. There are pretty useful functional hooks among them. Some people immediately associate functional programming with complex math and the M-word, but that’s not really the case. Functions are the real power in functional programming.
In this article we’ll see how to use some of them in order to make your daily Array routine comfortable, avoid code duplication and unnecessary typing just by using functions.
Reviewing a colleague of mine, we discussed the next function:
Simple computatios, right, but the flow is so nonlinear and nested. Is there a way to make…
iOS Developer at Ciklum Digital