[GHC] #11815: Data.List: Add a function to get consecutive elements (mapConsecutives)
GHC
ghc-devs at haskell.org
Fri Apr 8 14:22:08 UTC 2016
#11815: Data.List: Add a function to get consecutive elements (mapConsecutives)
-------------------------------------+-------------------------------------
Reporter: holmisen | Owner:
Type: feature request | Status: new
Priority: low | Milestone:
Component: libraries/base | Version:
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by dfeuer):
For educational porpoises, note that GHC is quite good at recognizing that
the recursive call always receives a `Just` value, so it can use a worker-
wrapper transformation to avoid all the `Maybe` business. I don't know if
the `seq` is strictly necessary here, but times I've left that out of
similar forms I've ended up regretting it eventually.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11815#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list