--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-user+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
filter out "weeds"
I wonder if there is a shortcut for ".filter(_.nonEmpty).map(_.get)". I quite often need to create a list of objects of a initial sequence of data where not all elements results in newly created objects (I use None for that). At that point I want to filter out "weeds" and expose "fruits" from such a sequence. I currently use ".filter(_.nonEmpty).map(_.get)" but wonder if there is a better way of achieving it.