Strange behavior of the function find() and remove()
Dennis Ritchie via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Mar 8 14:34:24 PDT 2015
This is normal behavior?
import std.stdio;
import std.algorithm;
void main() {
auto a = [3, 5, 8];
writeln(find(remove(a, 1), 5).length != 0); // prints false
writeln(a); // prints [3, 8, 8] ???
}
More information about the Digitalmars-d-learn
mailing list