fix Issue 10002 - calling std.algorithm.remove is impure
Merge pull request #1945 from 9rnsr/fix10002

[REG2.063a] Issue 10002 - calling std.algorithm.remove is impure