IterableExtensions<T> extension
Methods
-
firstOrDefault([bool test(T element)?])
→ T?
-
get the first item that match expression or null if not any
-
indexedForEach(void f(int index, T element))
→ void
-
loop items with index and element arguments
-
indexedMap<E>(E f(int index, T e))
→ Iterable<E>
-
map elements with index and return new map
-
lastOrDefault([bool test(T element)?])
→ T?
-
get the last item that match expression or null if not any
-
removeDuplicates([bool compare(T a, T b)?])
→ List<T>
-
Return a new list without duplicated elements
you can use
.toSet().toList()
but the order may not be the same