require

fnV require(K, V)(ref V[K] aa, K key, lazy V value = V.init) ref

If key is in aa, returns corresponding value; otherwise it evaluates value, adds it to the associative array and returns it.

Parameters

aaThe associative array.
keyThe key.
valueThe required value.

Returns

The value.