Logo

Programming-Idioms

  • Erlang
  • Groovy
m[k] = v

Use index notation. The value of k is used as the key. This delegates to the regular putAt method.
m.k = v

Uses property notation. Note: this uses the literal string value k as the key.
(assoc m k v)

Returns a new map.

New implementation...