Skip to content

The documention about maxBy (Array, List, ...) should state that the first max value is returned. #19129

Description

@ursenzler

Consider this code: myArray |> Array.indexed |> Array.maxBy snd |> fst

The code returns the index of the first max value. However, the documentation does not state this fact. I had to look into the implementation (I looked into the implementation of Array).

I propose to add this fact to the according documentatation pages (e.g. https://fsharp.github.io/fsharp-core-docs/reference/fsharp-collections-arraymodule.html#maxBy).

I can provide a PR, but I want to check first, whether it would have a chance to be accepted - maybe there is no such guarantee of returning the first maximum.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions