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

12 lines
321 B
Text

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