What is the idiomatic way of a getOrElseUpdate for immutable.Map instances?. I use the snippet below, but it seems verbose and inefficient
var map = Map[Key, Val
There's no such way - map mutation (update), when you're getting a map value, is a side effect (which contradicts to immutability/functional style of programming).
When you want to make a new immutable map with the default value, if another value for the specified key doesn't exist, you can do the following:
map + (key -> map.getOrElse(key, new Value))