```D void main() { import std.stdio : writeln; auto r = [0,1,2,3];
auto f = delegate() const // Compiles even though we are changing r
{ import std.array : popFront; r.popFront; }; r.writeln; // [0,1,2,3] f(); r.writeln; // [1,2,3] } ```
```D void main() { import std.stdio : writeln; auto r = [0,1,2,3];
auto f = delegate() const // Compiles even though we are changing r
{ import std.array : popFront; r.popFront; }; r.writeln; // [0,1,2,3] f(); r.writeln; // [1,2,3] } ```