
5 May
2008
5 May
'08
4:11 a.m.
Hi
I've found myself writing code like this several times now. Is there a better way?
hGetContents might be a different way to write a similar thing: read_args h = do src <- hGetContents h let (has,rest) = span ("#" `isPrefixOf`) $ lines src return (map tail has) Of course, depending on exactly the kind of IO control you need to do, it may not work. Thanks Neil