@@ -306,6 +306,7 @@ abstract mixin class Iterable<E> {
306
306
/// This operation will check each element in order for being equal to
307
307
/// [element] , unless it has a more efficient way to find an element
308
308
/// equal to [element] .
309
+ /// Stops iterating on the first equal element.
309
310
///
310
311
/// The equality used to determine whether [element] is equal to an element of
311
312
/// the iterable defaults to the [Object.==] of the element.
@@ -665,6 +666,7 @@ abstract mixin class Iterable<E> {
665
666
/// Checks that this iterable has only one element, and returns that element.
666
667
///
667
668
/// Throws a [StateError] if `this` is empty or has more than one element.
669
+ /// This operation will not iterate past the second element.
668
670
E get single {
669
671
Iterator <E > it = iterator;
670
672
if (! it.moveNext ()) throw IterableElementError .noElement ();
@@ -689,6 +691,7 @@ abstract mixin class Iterable<E> {
689
691
/// If no element satisfies [test] , the result of invoking the [orElse]
690
692
/// function is returned.
691
693
/// If [orElse] is omitted, it defaults to throwing a [StateError] .
694
+ /// Stops iterating on the first matching element.
692
695
E firstWhere (bool test (E element), {E orElse ()? }) {
693
696
for (E element in this ) {
694
697
if (test (element)) return element;
0 commit comments