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
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe