
10 Mar
2008
10 Mar
'08
7:01 p.m.
On Mon, Mar 10, 2008 at 3:11 PM, Paulo J. Matos
I would like to know if in fact there's any difference in practice between (), [()], i.e. if in practice the difference matters.
The type [()] is very similar to the type Integer and it's quite different from () because you can count with it. For example: main = do count <- mapM print ["Hello","World"] print $ "You printed " ++ show (length count) ++ " lines" You can't do that with a IO (). Not that I actually recommend doing this. -- Dan