Data.List.maximumBy uses counter-intuitive ordering
Dan Burton
danburton.email at gmail.com
Thu Jan 3 20:42:53 UTC 2019
I agree with the proposal to make maximumBy left-biased, and to document
this bias for both maximumBy and minimumBy.
-- Dan Burton
On Thu, Jan 3, 2019 at 3:28 PM Mario Blažević <mblazevic at stilo.com> wrote:
> 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.
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20190103/1b427a69/attachment.html>
More information about the Libraries
mailing list