Posted in July 2012

Thinking of Option as List

At the beginning it felt strange to me to use map and flatMap on an Option. But it makes a lot of sense because an Option is just a List which can be empty or just contains one element. The Option class (Scaladoc) even provides a method to convert an Option to a List: scala> … Continue reading