Stop using, opt match { case Some(x) => f(x); case None => y } Stop using, http://opt.map (f).getOrElse(y) Use, opt.fold(y)(f) I feel like I'm very late to this party.
-
-
The practical consequences for not understanding the basics in programming are just as dire, but less direct.
-
What harm did using a null ever do?! ...oh wait a moment...
- Show replies
New conversation -
-
-
Flying is easy but unforgiving of errors. It gives meaning to “fatal error”.
-
I can think of lots of (literal) fatal errors in software. Even those that apply to flying. Indeed, it's a contributor to why I often turn off the "(broken) certificated avionics" when I fly.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.