Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SCALA

scala list of options to option of list

if (myList.exists(_.isEmpty)) None else Some(myList.map(_.get))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #scala #list #options #option #list
ADD COMMENT
Topic
Name
5+6 =