Function List.frontCopy

Returns a copy of the first element in the list.

auto frontCopy(This)() scope;

Calling this function on an empty container causes null dereference.

Examples

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

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