Unify exceptions for out of bounds conditions in core functions
Open
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
Assessment
This issue has not been assessed yet.