Adding documentation and tests that maxBy/minBy return the first max/min element (Array, List, Seq)
Description
Added documentation and tests that maxBy/minBy return the first max/min element (Array, List, Seq).
Added tests that the first min/max element is returned (Array, List, Seq).
I wasn't able to add a test in CollectionModulesConsistency because I wasn't sure how to add it there because of the data generator.
!! I wasn't able to run the tests (fsx.exe not found in SDK 🤷) !!
I also cleaned up the exception docu on empty array/list/seq (once in the exceptions section, once as a remark).
I hope that helps 😃 Feel free to ignore, improve, change, take parts, ...
Fixes #19129
Checklist
- [X] Test cases added
- [ ] Performance benchmarks added in case of performance changes
- [ ] Release notes entry updated: does not apply
:heavy_exclamation_mark: Release notes required
@ursenzler,
[!CAUTION] No release notes found for the changed paths (see table below).
Please make sure to add an entry with an informative description of the change as well as link to this pull request, issue and language suggestion if applicable. Release notes for this repository are based on Keep A Changelog format.
The following format is recommended for this repository:
* <Informative description>. ([PR #XXXXX](https://github.com/dotnet/fsharp/pull/XXXXX))See examples in the files, listed in the table below or in th full documentation at https://fsharp.github.io/fsharp-compiler-docs/release-notes/About.html.
If you believe that release notes are not necessary for this PR, please add NO_RELEASE_NOTES label to the pull request.
You can open this PR in browser to add release notes: open in github.dev
| Change path | Release notes path | Description |
|---|---|---|
src/FSharp.Core |
docs/release-notes/.FSharp.Core/10.0.200.md | No release notes found or release notes format is not correct |
@dotnet-policy-service agree