IterableExtensions<E> extension

Extensions for Iterable operations and utilities.

on

Methods

countWhere(bool test(E element)) int

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

Returns the number of elements that satisfy test.
forEachIndexed(void action(int index, E element)) → void

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

Invokes action for each element together with its index.
mapIndexed<R>(R convert(int index, E element)) Iterable<R>

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

Maps each element together with its index.
none(bool test(E element)) bool

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

Returns true if no element satisfies test.
partition(bool test(E element)) → (List<E>, List<E>)

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

Splits the elements into two lists: those matching test and the rest.
sumBy(int selector(E element)) int

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

Returns the sum of selector applied to each element.
sumByDouble(double selector(E element)) double

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

Returns the sum of selector applied to each element as a double.
zip<R>(Iterable<R> other) List<(E, R)>

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

Pairs each element with the element at the same position in other.