Open
Description
I was reading the docs for Iterable.any
and it says this:
Checks every element in iteration order, and returns
true
if any of them maketest
returntrue
, otherwise returns false. Returnsfalse
if the iterable is empty.
At first I thought that it'd check every
(all) element in iteration order, then return true
if any of them makes test return true.
But the implementation actually returns immediately:
sdk/sdk/lib/core/iterable.dart
Line 481 in 107995f
I think something like this may be clearer:
"Checks elements in iteration order, and returns true
when any of them makes test
return true
, otherwise returns false."
(This maybe too subtle a change for my level of english, though 😅)