Map to use.
Key to find the value for.
Function to generate default value to insert and return if no result was found.
Finds the result of calling map.get(key)
.
If there is no result, it instead returns the result of the default function.
The Map will also be updated to assign the resolved default value to the given key.
Map to use.
Key to find the value for.
Function to generate default value to insert and return if no result was found.
Finds the result of calling
map.get(key)
. If there is no result, it instead returns the result of the default function. The Map will also be updated to assign that default value to the given key.