Iterables<T> extension

Provides additional operations for Iterable.

on

Methods

distinct() Iterable<T>
Returns an Iterable in which duplicate elements are pruned.
indexed({int initial = 0}) Iterable<MapEntry<int, T>>
Returns an Iterable that indexes each element, start from initial.
listen(void listen(T)) Iterable<T>
Returns an Iterable that, for each element, calls listen with the current element.
mapWhere(bool predicate(T), T replace(T)) Iterable<T>
Returns an Iterable that replaces elements that do not satisfy predicate with the new element returned by replace.
none(bool predicate(T)) bool
Returns true if none of the elements in this Iterable match predicate.
toMap<K, V>(K key(T), V value(T)) Map<K, V>
Transforms this Iterable into map, using key and value to produce keys and values respectively.