I have a method that should convert a list to an Option of an object, or None if the list is empty.
Option
None
def listToOption(myList: List[F
How about:
Some(myList) collect { case(l@hd::tl) => Bar(l) }
Seems pretty scala-esque to me.