Dumb scala question: is there a nicer way to express this? def foo(opt: Option[List[Int]]) = opt.toList.flatMap{list => list.map{n => n*2}}
@snoble I agree. That's what scrooge generates for `optional list<string>` though.
-
-
@avibryant then opt.getOrElse(…).map(…) seems more clear to meThanks. 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.