At Mon, 10 Mar 2008 22:11:33 +0000,
Paulo J. Matos wrote:

> I would like to know if in fact there's any difference in practice
> between (), [()], i.e. if in practice the difference matters.

Well, you could do something like this:

outputLines :: Int -> IO [()]
outputLines i = mapM (putStrLn . show) (take (i*2) $ iterate ((+) 1) 1)

main = 
    do l <- outputLines 10
       putStrLn $ "I putted " ++ show (length l) ++ " lines."

which is not very exciting in this case. But I think I may have done
something similar in real code.

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

Reply via email to