Skip to content

Instantly share code, notes, and snippets.

@dcsobral
Created February 22, 2014 01:04
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 dcsobral/84490dfb067539b6b937 to your computer and use it in GitHub Desktop.
Save dcsobral/84490dfb067539b6b937 to your computer and use it in GitHub Desktop.
Removing elements from immutable maps
scala> Map(1 -> 2, 2 -> 3)
res0: scala.collection.immutable.Map[Int,Int] = Map(1 -> 2, 2 -> 3)
scala> res0 - 1
res1: scala.collection.immutable.Map[Int,Int] = Map(2 -> 3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment