SList.tail

Advance to the next element in the list. The user must check that the list isn't empty, prior to calling this function.

This must be used in order to iterate through a const or immutable list. For a mutable list this is equivalent to calling popFront.

struct SList(T)
Qualified
tail
(
this Qualified
)
()

Return Value

Type: Qualified

a list that starts with the next element in the original list

Complexity: O(1).

Examples

auto isl = immutable SList!int([1, 2, 3]);
assert(isl.tail.front == 2);

Meta