var. It does not
convert to immutable(var) implicitly (D immutability is transitive over the nested mutable containers), so the return value cannot be published as an immutable snapshot without an explicit cast; no such freeze API is currently provided.
Returns
A new mutable
var that is a deep copy of this value.Examples
var original = var([1, 2, 3]);
var copy = original.idup;
copy[0] = 99;
assert(original[0].as!int == 1); // independent nested copy