Function DList.popLastOf

Removes the front or back element of the range from the list respectively.

DList.Range popLastOf (
  DList.Range range
);

Parameters

NameDescription
range Range whose element should be removed.

Returns

range with its front or back element removed.

Precondition

!range.empty. range is extracted from this list.

Example

auto list = DList!int([5, 234, 30]);
auto range = list[];

range.popFront();
range = list.popFirstOf(range);
assert(range.front == 30);
assert(range.back == 30);

assert(list.popLastOf(range).empty);
assert(list[].front == 5);
assert(list[].back == 5);