On Thu, May 22, 2014 at 8:07 AM, Tathagata Das <[email protected]> wrote: > records.filter { _.isInstanceOf[Orange] } .map { _.asInstanceOf[Orange] }
I think a Scala-ish way would be
records.flatMap(_ match {
case i: Int=>
Some(i)
case _ =>
None
})
