8 Apr
2004
8 Apr
'04
6:47 a.m.
Subject: [Haskell] overuse of maybe and [] in prelude and libs Date: Wed, 7 Apr 2004 23:41:55 -0400 (Eastern Standard Time) From: "S. Alexander Jacobson" <alex@alexjacobson.com> To: Haskell Mailing List <haskell@CS.YALE.EDU>
...
PS Shouldn't concat be defined with foldl and not foldr? Doesn't foldr imply that you can't concat infinite lists? (I know this is a FAQ, but where?)
Quite in contrary: foldl (++) [] [[i] | i <- [1..]] fails to terminate, whereas foldr (++) [] [[i] | i <- [1..]] happily produces output. Ciao, Janis. -- Janis Voigtlaender http://wwwtcs.inf.tu-dresden.de/~voigt/ mailto:voigt@tcs.inf.tu-dresden.de