Function List.moveFront

Move of the first element in the list and return it.

List.ElementType moveFront() pure nothrow @nogc scope @safe;

Calling this function on an empty container causes null dereference.

Examples

auto list = List!(int).build(1, 2, 3);

assert(list.moveFront == 1);
list.popFront;
assert(list == [2, 3]);