DList.remove

Removes r from the list.

struct DList(T)
remove
(
scope Range r
)

Parameters

r Range

The range to remove.

Return Value

Type: Range

Range spanning the elements just after r.

Precondition: r is extracted from this list.

Examples

auto l1 = DList!int([5, 234, 30, 1]);
auto l2 = DList!int([5]);
auto r = l1[];

r.popFront();

assert(l1.remove(r).empty);
assert(l1 == l2);

Meta