Skip to content

Iterable.any docs slightly unclear? #59576

Open
@ditman

Description

@ditman

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 make test return true, otherwise returns false. Returns false 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:

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 😅)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-core-librarySDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.type-documentationA request to add or improve documentationtype-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions