News for hackers. Stuff that matters.
Re:Kotlin: The Problem with null by adambard on Friday January 12, 2018 @08:08PM (#16137661)
In Scala, you can use `for`, although I think your point remains valid for languages without any sort of monad support:

    def func1(q: Option[Int], z: Option[Int]): Int = {
        (for {
            qval <- q
            zval <- z
        } yield q + z).getOrElse(0)
    }

There are no comments on this comment yet.