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.
-
-
And excuse to explain what `fold` is to a junior dev.. :D getOrElse is more readable to me...
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
your tweet reply isn't as concise as it could be. the "That's all!" was unnecessary. :-P
-
I overelaborated, to a degree of such significantly unnecessary verbosity as to have introduced redundancy beyond that which was warranted under the circumstances, being, as it were, a near-tautology, rather than the paragon of self-referentialism it might have been. That's all.
- Show replies
New conversation -
-
-
Correctness first.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
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.