Assign op value val to element at position index.
{ auto vec = Vector!(int, 4).build(1, 2, 3, 4, 5); vec[1] += 40; assert(vec == [1, 42, 3, 4, 5]); } { auto vec = Vector!(int, 4).build(1, 2, 3, 4, 5); vec[1 .. $-1] *= -1; assert(vec == [1, -2, -3, -4, 5]); }
See Implementation
Assign op value val to element at position index.