In Scala, the debate between using fold on an Option or using map and getOrElse is almost as old as the language. The method signature for this is:
def fold[B](ifEmpty: => B)(f: (A) => B): B
That is to say, fold always returns type B, and takes two arguments. The first takes a function returning type B if the option is "empty" (None) and the second takes a function that is called with the contents of the Some. As you can see, it's syntactic sugar for map and getOrElse. def map[B](f: (A) => B): B
def getOrElse[B](f: => B): B