The current implementation (maybe not yet distributed) has an "add()" method for maps that adds something to a value. Since there are default return values, if you, for instance, want to use a hash map as a set of counters you can set up a map with default value 0 and call map.add( key, 1 ). If the key is their, the counter is incremented. If not, it is set to 1 (as the default return value is -1).
This is less generic than "adjuctOrPutValue", but I'm not in favour of excessively customized dictionary methods.
Ciao,
seba
An ETA on distribution?
> That's enough for me, I don't need the increment to differ from the
> 'new value' value.
>
> An ETA on distribution?
I was wrong, it's online since a while. Just use 6.2.2.
6.2.0 -> 6.2.2
- A new add() method makes the usage of maps as counters easier
and faster.
Ciao,
seba