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)
Written by Erik Allik
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Scala
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#