Scala的Option类型定义在 scala/scala的src/library/scala/Option.scala中:
sealed abstract class Option[+A]
final case class Some[+A](x: A) extends Option[A]
case object None extends Option[Nothing]
对应的Haskell定义是: data Maybe a = Nothing | Just a
Scala的Option类型定义在 scala/scala的src/library/scala/Option.scala中:
sealed abstract class Option[+A]
final case class Some[+A](x: A) extends Option[A]
case object None extends Option[Nothing]
对应的Haskell定义是: data Maybe a = Nothing | Just a