
28 Dec
2018
28 Dec
'18
3:37 p.m.
On Fri, 28 Dec 2018, 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.
Btw. Data.Semigroup exports Min and Max that are both left-biased: Prelude Data.Semigroup> min (Arg 2 3) (Arg 2 2) :: Arg Int Int Arg 2 3 Prelude Data.Semigroup> max (Arg 2 3) (Arg 2 2) :: Arg Int Int Arg 2 3