The maybe monad is good way to deal with computations that may fail. Here is a Swift walkthrough <a href="http:&#x2F;&#x2F;www.mokacoding.com&#x2F;blog&#x2F;functor-applicative-monads-in-pictures&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.mokacoding.com&#x2F;blog&#x2F;functor-applicative-monads-in...</a>