Extension<E> extension

Utility extension methods for operations on Iterables.

on

Methods

enumerate() Iterable<(int, E)>

Available on Iterable<E>, provided by the Extension extension

Models the Python enumerate function. Returns a new iterable of tuples where the first element is the index and the second element is the value.
skipLast(int count) Iterable<E>

Available on Iterable<E>, provided by the Extension extension

Returns a new iterable containing the elements of this iterable. During iteration, the last count elements are dropped. If count is greater than the number of elements in this iterable, an empty iterable is returned.