Last Updated: February 25, 2016
·
558
· eallik

concatenating Scala Option[T]

This is quite useful:

> val x: Option[Int] = Option(123)
> val y: Option[Int] = None
> val z: Option[Int] = Option(321)
> x ++ y ++ z
res3: Iterable[Int] = List(123, 321)