Adding documentation and tests that maxBy/minBy return the first max/min element (Array, List, Seq)#19140
Adding documentation and tests that maxBy/minBy return the first max/min element (Array, List, Seq)#19140ursenzler wants to merge 2 commits intodotnet:mainfrom
Conversation
…nd minBy functions on List, Array, and Seq modules. Also cleaned-up duplicate "exception on empty" documentation.
❗ Release notes requiredCaution 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:
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
|
|
@dotnet-policy-service agree |
… element Fixes the Repo Assist workflow failure for PR #19140. Adds documentation remarks to array.fsi, list.fsi, and seq.fsi stating that maxBy/minBy returns the first maximal/minimal element when there are multiple equal elements. Adds corresponding tests for Array, List, and Seq modules. Co-authored-by: T-Gro <46543583+T-Gro@users.noreply.github.com> Agent-Logs-Url: https://github.com/dotnet/fsharp/sessions/c602ace4-48eb-4981-9070-8cbad6504be9
|
(copied over to a fresh PR) |
Pull request was closed
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
CollectionModulesConsistencybecause 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