#3631: Overload the Prelude iterate to support list input
---------------------------------+------------------------------------------
Reporter: shelbymoore3 | Owner:
Type: feature request | Status: closed
Priority: normal | Milestone:
Component: Prelude | Version: 6.10.4
Severity: normal | Resolution: wontfix
Keywords: | Difficulty: Unknown
Testcase: | Os: Unknown/Multiple
Architecture: Unknown/Multiple |
---------------------------------+------------------------------------------
Changes (by igloo):
* status: new => closed
* difficulty: => Unknown
* resolution: => wontfix
Comment:
Thanks for the suggestion, but if you would like to propose changes to the
libraries, please see:
http://www.haskell.org/haskellwiki/Library_submissions
However, a few things come to mind with your proposed change:
* If you did change the Prelude `iterate` rather than adding a new
function, then you would probably break lots of code
* Your definition retains the whole list, so could cause space leaks
* `last` takes time linear in the length of its input, so performance
where you want the last element (as current uses of `iterate` do) will not
be good
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3631#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs