immutable(int[]) a = [1,2,3];
        assert(!is(typeof({a[0] = 0;}))); // cannot change elements
        assert(!is(typeof({a = [1,1,1];}))); // cannot rebind

        // but I'm allowed to sort in place...
        a.reverse;
        assert(a == [3,2,1]);

Reply via email to