[GHC] #4282: Data.List.intersperse not lazy enough
GHC
cvs-ghc at haskell.org
Thu Sep 2 04:45:56 EDT 2010
#4282: Data.List.intersperse not lazy enough
----------------------------------+-----------------------------------------
Reporter: daniel.is.fischer | Owner:
Type: proposal | Status: new
Priority: normal | Component: libraries/base
Version: 6.12.3 | Keywords: intersperse, laziness
Testcase: | Blockedby:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: Other
----------------------------------+-----------------------------------------
Comment(by maeder):
Does the following implementation gain something?
{{{
intersperse :: a -> [a] -> [a]
intersperse s l = case l of
[] -> l
x : r -> x : case r of
[] -> r
_ -> s : intersperse s r
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4282#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list