scalascalazlifting

Scala lift from List[A] to List[Option[A]]


In scala, how can i create a general purpose function to perform the following operation:

f: List[A] ==> List[Option[A]]


Solution

  • Isn't it as simple as _.map(Option.apply)?