Function SList.popFirstOf
Removes the front element of the range from the list.
Parameters
Name | Description |
---|---|
range | Range whose front element should be removed. |
Returns
range with its front element removed.
Precondition
!range.empty
.
range is extracted from this list.
Example
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);