Data.List.maximumBy uses counter-intuitive ordering
Mario Blažević
mblazevic at stilo.com
Thu Jan 3 20:28:23 UTC 2019
On 2018-12-28 8:18 a.m., Johannes Waldmann wrote:
> Dear all,
>
> this was brought up on the GHC tracker (not by me)
>
> https://ghc.haskell.org/trac/ghc/ticket/15921
>
> and it was suggested for discussion here.
>
> my summary: Data.List.maximumBy is right-biased,
> minimumBy is left-biased, and none of this is documented.
>
Already discussed at least twice:
https://mail.haskell.org/pipermail/haskell-cafe/2011-September/095150.html
https://mail.haskell.org/pipermail/libraries/2013-September/020721.html
There are justifications for the current behaviour, but documenting it
can't harm anybody.
More information about the Libraries
mailing list