IterableTakeDropLast<T> extension

Collections More: take/drop last, replace first/all, cycle, pad, unzip, segment, consecutive pairs, etc. Roadmap #266-290. Take/drop from the end of an iterable.

on

Methods

dropLast(int n) List<T>

Available on Iterable<T>, provided by the IterableTakeDropLast extension

All but the last n elements.
takeLast(int n) List<T>

Available on Iterable<T>, provided by the IterableTakeDropLast extension

Last n elements; all if n >= length.