Posted By

pligor on 09/23/12


Tagged

map


Versions (?)

remove item from Map and return a new Map


 / Published in: Scala
 

remove item from immutable Map and return a new Map

  1. val origMap = Map("key1" -> "something", "key2" -> "else");
  2. val myMap = origMap - "key1";
  3. //myMap looks like Map("key2" -> "else")

Report this snippet  

You need to login to post a comment.