Skip to content

Instantly share code, notes, and snippets.

@deanwampler
Created February 7, 2021 23:29
Show Gist options
  • Save deanwampler/e22489322f852c7faf0fd958a8aa5fc9 to your computer and use it in GitHub Desktop.
Save deanwampler/e22489322f852c7faf0fd958a8aa5fc9 to your computer and use it in GitHub Desktop.
scala> val o1 = Option.Some(1)
val o1: Option[Int] = Some(1) // Note the inferred types for all four cases.
scala> val o2 = Option.None
val o2: Option[Nothing] = None
scala> import Option._
scala> val o3 = Some(1)
val o3: Some[Int] = Some(1)
scala> val o4 = None
val o4: None.type = None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment