Fixes a spaceleak in `maximumBy` and `minimumBy` (#10830).
authorRyan Scott <ryan.gl.scott@gmail.com>
Fri, 3 Mar 2017 22:49:35 +0000 (17:49 -0500)
committerBen Gamari <ben@smart-cactus.org>
Sat, 4 Mar 2017 21:04:14 +0000 (16:04 -0500)
commit2e43848236a4b80015d8fb09a87f6f6a746c1365
tree71b0ba46670b0f234c311b3428b515fc417fa3a9
parent31b3d0c7aa35860521cfe9232270871015d693de
Fixes a spaceleak in `maximumBy` and `minimumBy` (#10830).

This involved changing the implementation from using
`foldr11` to using `foldl1`.

Test Plan: validate

Reviewers: austin, hvr, bgamari, dalaing, dfeuer

Reviewed By: bgamari

Subscribers: RyanGlScott, dfeuer, thomie

Differential Revision: https://phabricator.haskell.org/D3019
libraries/base/Data/Foldable.hs
libraries/base/changelog.md