Skip to content

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

@ursenzler

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    New

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions