
5 Mar
2006
5 Mar
'06
7:53 p.m.
Hi
do x <- readFile "test.txt"
print (length (lines x))
That prints out the number of lines in a file, but once you have done
lines x, you can do anything you want to the lines
Thanks
Neil
On 3/5/06, Richard Gooding
Hi,
can someone please point me at some code to read in the lines for a file - a working example ?
I've have checked the tutorials on the wiki (some broken links) but couldn't find anything. - and my "The craft of functiional programming" doesn't have an example either !
thanks Rich _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe