Feature to get or add value to an associative array.
Giles Bathgate
giles.bathgate at gmail.com
Tue Apr 17 15:35:53 UTC 2018
On Tuesday, 17 April 2018 at 09:21:14 UTC, Giles Bathgate wrote:
> The java name for such a function is `computeIfAbsent`
More names from other languages, this time python:
https://docs.python.org/3/library/stdtypes.html#dict.setdefault
It's horrid though, a method called `set` that returns a value?
Maybe I am biased against anything pythonic ;)
More information about the Digitalmars-d
mailing list