Is there library to do in place modification of dynamic arrays?
Brother Bill
brotherbill at mail.com
Fri Dec 19 13:23:29 UTC 2025
On Friday, 19 December 2025 at 12:31:29 UTC, Nick Treleaven wrote:
> https://dlang.org/phobos/std_algorithm_mutation.html#remove
This code has wrong result. What am I doing wrong?
```
int[] array = [10, 20, 30, 40];
array = array.remove([1, 3]); // Expect 20, 40 to be removed.
Expect array to be: [10, 30]
writeln(array); // [10, 40]
```
Is this a feature or a bug? This is not what I expected.
More information about the Digitalmars-d-learn
mailing list