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.
I didn't really want to recommend using it everywhere... that tweet was meant to introduce people to the more concise alternative API, but was badly worded! Though check out the other responses on the thread, as a lot of people had good thoughts on it!
-
-
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.