February 2018
Intermediate to advanced
552 pages
13h 46m
English
In Scala, Option is used to represent whether a value is present or absent. It is a Type class like scala.Option. It is one of the frequently used Monad types in Scala-based applications.
The main advantages or goal of the Option type are as follows:
In the Scala source code, these three components are defined, as shown here:
sealed abstract class Option[+A] case object None extends Option[Nothing] final case class Some[+A] extends Option[A]
Let's take a value T into the Option type such as Option[T]. If a value is present in the Option type, then ...
Read now
Unlock full access