dotnet / dotnet/fsharp

Unify exceptions for out of bounds conditions in core functions

Open
#17,351 4 comments 0 reactions 0 assignees View on GitHub
Area-Library Breaking-change Feature Request
Dominant language
F#
Stars
4.3k
Forks
876
Avg merge
4d 11h
Merged PRs (30d)
131

Description

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 https://github.com/dotnet/fsharp/pull/17277#discussion_r1653866870_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.