phobos/changelog/std-container-slist-linearRemoveElement.dd
2017-10-25 13:50:10 +03:00

12 lines
321 B
Text

`std.container.slist` supports `linearRemoveElement`
`linearRemoveElement` removes the first occurence of an element from the slist
-----
import std.container : Slist;
import std.algorithm.comparison : equal;
auto a = SList!int(-1, 1, 2, 1, 3, 4);
a.linearRemoveElement(1);
assert(equal(a[], [-1, 2, 1, 3, 4]));
-----