Skip to content

Instantly share code, notes, and snippets.

@ummels
Created November 17, 2015 11:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ummels/5e936e23ec6e3bf807c3 to your computer and use it in GitHub Desktop.
Save ummels/5e936e23ec6e3bf807c3 to your computer and use it in GitHub Desktop.
val m = Map(0 -> 'a')
for (n <- 0 until 2) {
m.get(n) match {
case Some(x) => println(s"Value found for key $n: $x")
case None => println(s"No value found for key $n")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment