remove item from Map and return a new Map


/ Published in: Scala
Save to your folder(s)

remove item from immutable Map and return a new Map


Copy this code and paste it in your HTML
  1. val origMap = Map("key1" -> "something", "key2" -> "else");
  2. val myMap = origMap - "key1";
  3. //myMap looks like Map("key2" -> "else")

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.