tail property
Return all the elements of a Iterable
except the first one.
If the Iterable
is empty, return None.
Notice: This operation checks whether the iterable is empty at the time when the Option is returned. The length of a non-empty iterable may change before the returned iterable is iterated. If this original iterable has become empty at that point, the returned iterable will also be empty, same as if this iterable has only one element.
Implementation
Option<Iterable<T>> get tail => isEmpty ? const None() : some(skip(1));