withoutFirst method

Iterable<T> withoutFirst()

Lazily returns all values without the first one.

Example:

[1, 2, 3].withoutFirst(); // [2, 3]
[].withoutFirst(); // [];

Implementation

Iterable<T> withoutFirst() sync* {
  iterator.moveNext(); // eat the first
  while (iterator.moveNext()) {
    yield iterator.current;
  }
}