Skip to content
Snippets Groups Projects
Commit ca4d5290 authored by Felix Herrmann's avatar Felix Herrmann
Browse files

[lec02] update option.scala

parent 6d7cb1e9
No related branches found
No related tags found
No related merge requests found
package errors
sealed trait Option[+A] {
def map[B](f: A => B): Option[B] = this match {
case None => None
case Some(a) => Some(f(a))
}
def map[B](f: A => B): Option[B] = ???
def getOrElse[B >: A](default: => B): B = ???
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment