[Haskell-beginners] count function
john.moore54 at gmail.com
Sun Oct 18 10:52:28 EDT 2009
Trying to get aprogram to count all the lines or words from a file. Not
sure about the syntax. Probably missing some.
Here's what I have so far any help in the right direction would be great.
main :: IO ()
main = do
incom <- openFile "file.txt" ReadMode
otcom <- openFile "prob.txt" WriteMode
fCount incom otcom
fCount incomh otcomh =
do eof <- hIsEof incomh
else do c <- hGetCount incom
it tells me parse error on =
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Beginners