Looks up key; if it exists returns corresponding value else evaluates value, adds it to the associative array and returns it.
The associative array.
The key.
The required value.
The value.
auto aa = ["k1": 1]; assert(aa.require("k1", 0) == 1); assert(aa.require("k2", 0) == 0); assert(aa["k2"] == 0);
See Implementation
Looks up key; if it exists returns corresponding value else evaluates value, adds it to the associative array and returns it.