IterableMethods<T> extension

on

Methods

elementAtOrNull(int index) → T?
Gets an element at specific index or returns null
filter(bool fun(T e)) Iterable<T>
Returns a list containing only elements matching the given predicate
filterNot(bool fun(T element)) Iterable<T>
Returns a list containing all elements not matching the given predicate
filterNotNull() Iterable<T>
Returns a list without null values
find(bool predicate(T e)) → T?
Returns the first element matching the given predicate, or null
forEachIndexed(void f(int index, T item)) → dynamic
Gives possibility to use index in forEach function
getRandom() → T
Returns the element at random index
mapIndexed<R>(R fun(int index, T item)) Iterable<R>
Gives possibility to use index in map function
zip<R>(Iterable<R> other) Iterable<Pair<T, R>>
Creates new collection of pairs from two collections