Let\'s say I have two optional Ints (both can be Some or None):
val one : Option[Int] = Some(1) val two : Option[Int] = Some(2)
My question is
How about:
one.map(_ + two.getOrElse(0)).orElse(two)