[Haskell-cafe] IO () and IO [()]

Felipe Lessa felipe.lessa at gmail.com
Mon Mar 10 18:46:47 EDT 2008


On Mon, Mar 10, 2008 at 7:34 PM, Alfonso Acosta
<alfonso.acosta at gmail.com> wrote:
>  BTW, considering how often is (putStrLn.show)  used, it is surprising
>  that there is no Ln variant for print (just like it happens with
>  putStr and putStrLn)

Actually,

> print = putStrLn . show

so

> outputLines i = mapM_ print [1..i]

-- 
Felipe.


More information about the Haskell-Cafe mailing list