Skip to content

Unify exceptions for out of bounds conditions in core functions #17351

@psfinaki

Description

@psfinaki

We have 3 different behaviors currently:
X.skip throws InvalidArgOutOfRange when count > n
X.take throws InvalidOperation when count > n
X.sample throws InvalidArg when count > n

We should unify this, updating the code along with RFCs probably.

Originally posted by @Lanayx in #17277 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-LibraryIssues for FSharp.Core not covered elsewhereBreaking-changeDescribes a bug which is also a breaking change.Feature Request

    Projects

    Status

    New

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions