I've found myself writing code like this several times now. Is there a better way?

 read_args h = do
   line <- hGetLine h

   case line of
     "." -> return []
     ('#':y) -> do
       ys <- read_args h
       return (y:ys)

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to