Core concept
val m = Map("a" -> 1, "b" -> 2)
m("a") // 1
m + ("c" -> 3) // new MapAdvertisement
How it works
Update = new Map. Persistent structure sharing.
Advertisement
Trade-offs + gotchas
Immutable lookup + update.
val m = Map("a" -> 1, "b" -> 2)
m("a") // 1
m + ("c" -> 3) // new MapUpdate = new Map. Persistent structure sharing.
Immutable lookup + update.