scala list of options to option of list
import scalaz.syntax.traverse._ import scalaz.std.list._ import scalaz.std.option._ myList.sequence
Source: stackoverflow.com
scala list of options to option of list
if (myList.exists(_.isEmpty)) None else Some(myList.map(_.get))
Source: stackoverflow.com