List.moveFront

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

Calling this function on an empty container causes null dereference.

struct List
scope pure nothrow @safe @nogc
moveFront
()

Examples

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

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

Meta