The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Newsgroups: fa.haskell
From: John Meacham <j...@repetae.net>
Date: Mon, 18 Feb 2008 01:09:42 UTC
Local: Sun, Feb 17 2008 8:09 pm
Subject: Re: [Haskell-cafe] Doubting Haskell
On Sat, Feb 16, 2008 at 05:04:53PM -0800, Donn Cave wrote: Part of it is that using 'getLine' is not idiomatic haskell when you > But in Haskell, you cannot read a file line by line without writing an > exception handler, because end of file is an exception! as if a file does > not normally have an end where the authors of these library functions > came from? don't want to worry about exceptions. Generally you do something like doMyThing xs = print (length xs) main = do which will call 'doMyThing' on each line of the file, in this case or more succinctly: main = readFile "my.file" >>= mapM_ doMyThing . lines John -- You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||