Provide the .dup array property.
auto arr = [1, 2]; auto arr2 = arr.dup; arr[0] = 0; assert(arr == [0, 2]); assert(arr2 == [1, 2]);
See Implementation
Provide the .dup array property.