[Haskell-cafe] About print and side-effects

Daniel Carrera daniel.carrera at zmsl.com
Sun Dec 18 15:22:25 EST 2005

Hi all,

The recent responses to my first question (thanks guys!) included the 
following bit:

main = print (fact 42)

Now, print is a side-effect. Shouldn't it involve a do-block or a nomad 
or one of those scary things you hear about when learning about side 
effects in functional programs? How come 'print' is allowed to exist 
alone if it's a side-effect?

Thanks for the help.

      /\/`) http://oooauthors.org
     /\/_/  http://opendocumentfellowship.org
    \/_/    I am not over-weight, I am under-tall.

More information about the Haskell-Cafe mailing list