iterable/iterable_more_extensions library

Extensions

IterableAllEqual on Iterable<T>
Check if all elements are equal.
IterableArgMinMax on Iterable<T>
Index of min/max by a comparable key.
IterableConsecutive on List<T>
Consecutive pairs from a list.
IterableCountBy on Iterable<T>
Count occurrences of each element.
IterableCycle on List<T>
Infinite cycle over list elements.
IterablePad on List<T>
Pad list to a minimum length.
IterableReplace on List<T>
Replace first or all occurrences in a list.
IterableScan on Iterable<T>
Prefix scan (running reduce).
IterableSegment on Iterable<T>
Segment iterable into lists where consecutive pairs satisfy predicate.
IterableTakeDropLast on Iterable<T>
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.

Functions

unzip2<A, B>(List<(A, B)> pairs) → (List<A>, List<B>)
Splits pairs into two lists: first elements and second elements.