[GHC] #12505: Add foldl1' to Data.Foldable

#12505: Add foldl1' to Data.Foldable -------------------------------------+------------------------------------- Reporter: tserduke | Owner: Type: feature | Status: new request | Priority: normal | Milestone: Component: | Version: 8.1 libraries/base | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- With the change strict `Foldable` instances could be written in a simple and performant manner: {{{#!hs maximum = foldl1' max minimum = foldl1' min sum = foldl1' (+) product = foldl1' (*) }}} Also `foldl1'` from `Data.List` gets generalized. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12505 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC