Created
February 7, 2021 23:29
-
-
Save deanwampler/e22489322f852c7faf0fd958a8aa5fc9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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