[Haskell-beginners] A first try
jaredhance at gmail.com
Sat Jun 25 15:21:57 CEST 2011
> I had thought hGetContents was lazy IO. If so, will that even work?
> The handle to the file will be closed before much of the file is even
My guess is that the code I gave, which honestly is bad because I forgot
about readFile, is probably lazy rather than strict because according to
, readFile is lazy despite the fact that it doesn't require explicit
Sorry, looks like I accidently hit r instead of L so it got taken off
the mailing list.
Look at that--the guts of the program take up only two lines!
readFile returned a lazy String, which we stored in inpStr. We then
took that, processed it, and passed it to writeFile for writing. 5
More information about the Beginners