SCIterableBasics<E> extension

Utility extension SCmethods for the native Iterable class.

on

Methods

all(bool test(E element)) bool
Alias for Iterable.every.
containsAll(Iterable<E> other, {bool collapseDuplicates = true}) bool
Returns true if every element in other also exists in this.
containsAny(Iterable<E> other) bool
Returns true if this contains at least one element also contained in other.
forEachIndexed(void funcIndexValue(int index, E element)) → void
Applies the function funcIndexValue to each element of this collection in iteration order. The function receives the element index as first parameter index and the element as the second parameter.
none(bool test(E element)) bool
Returns true if no element of this satisfies test.
one(bool test(E element)) bool
Returns true if there is exactly one element of this which satisfies test.
sum(num addend(E)) num
Returns the sum of all the values in this iterable, as defined by addend.