We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The recently updated getOrElse example at the top of options.md uses upper bounds. We need to describe them!
getOrElse
options.md
sealed trait Option[+A] { def getOrElse[B >: A](default: B): B def isEmpty: Boolean def isDefined: Boolean = !isEmpty // other methods... } final case class Some[A](x: A) extends Option[A] { def getOrElse[B >: A](default: B) = x def isEmpty: Boolean = false // other methods... } case object None extends Option[Nothing] { def getOrElse[B >: Nothing](default: B) = default def isEmpty: Boolean = true // other methods... }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The recently updated
getOrElse
example at the top ofoptions.md
uses upper bounds. We need to describe them!The text was updated successfully, but these errors were encountered: