Skip to content

Instantly share code, notes, and snippets.

@bretthoerner
Created February 14, 2013 17:38
Show Gist options
  • Save bretthoerner/4954534 to your computer and use it in GitHub Desktop.
Save bretthoerner/4954534 to your computer and use it in GitHub Desktop.
scala> val m = Map("baz" -> 1, "foo" -> null)
m: scala.collection.mutable.Map[String,Any] = Map(baz -> 1, foo -> null)
scala> m.get("baz")
res2: Option[Any] = Some(1)
scala> m.get("foo")
res3: Option[Any] = Some(null)
scala> m.get("huh?")
res4: Option[Any] = None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment