IterableExtensions<T> extension

Extensions on Iterable to provide convenient functional utilities.

on

Methods

firstWhereOrNull(bool test(T element)) → T?

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

Returns the first element matching test, or null if none found.
forEachIndexed(void action(int index, T element)) → void

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

Iterates through elements with their respective indices.
lastWhereOrNull(bool test(T element)) → T?

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

Returns the last element matching test, or null if none found.
mapIndexed<R>(R transform(int index, T element)) → Iterable<R>

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

Maps elements with their indices to a new Iterable.