Iterable.any
docs slightly unclear?
#59576
Labels
area-core-library
SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.
type-documentation
A request to add or improve documentation
type-enhancement
A request for a change that isn't a bug
I was reading the docs for
Iterable.any
and it says this:At first I thought that it'd check
every
(all) element in iteration order, then returntrue
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 makestest
returntrue
, otherwise returns false."(This maybe too subtle a change for my level of english, though 😅)
The text was updated successfully, but these errors were encountered: