SList.popFirstOf

Removes the front element of the range from the list.

struct SList(T)
popFirstOf

Parameters

range Range

Range whose front element should be removed.

Return Value

Type: Range

$(D_PSYMBOL range) with its front element removed.

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

Examples

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

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

range = list[];
assert(range.front == 5);
range.popFront;
assert(range.front == 30);
range.popFront;
assert(range.empty);

Meta