concept putStrLn in category haskell

appears as: putStrLn
Get Programming with Haskell

This is an excerpt from Manning's book Get Programming with Haskell.

If main isn’t a function, it should follow that neither is putStrLn. You can quickly clear this up by looking at putStrLn’s type:

putStrLn :: String -> IO ()

As you can see, the return type of putStrLn is IO (). Like main, putStrLn is an IO action because it violates our rule that functions must return values.

sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage