Skip to content

maxBy and minBy for duplicate values #64

Description

@kaftand

Perhaps this doesn't belong here, but I was using maxBy and minBy and noticed something a little surprising. If there are duplicate max values, only one is returned, with no warning.

i.e. [|(1,'a');(2,'b');(2,'c')|] |> Array.maxBy fst
= (2,'b')

Perhaps it should just return 2, or an array, or a result<'a,'a[]>, but as it stands, I think the current behavior is a bit surprising.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions