Nick Name wrote:

> This approach is called "monads" and is needed because haskell is a lazy
> language, so order of evaluation is unspecified, while input/output
> usually needs a precise order of evaluation.

It is needed because Haskell is a functional language, where functions
are referentially transparent, so the result of applying a function to
an argument depends only upon the function and the argument, and not
upon some hidden "state".

Even if Haskell were strict, you still wouldn't be able to treat I/O
operations as functions without discarding referential transparency.

> Maybe someone has to suggest some simple article on monads.

        "What the hell are Monads?"
        http://www.dcs.gla.ac.uk/~nww/Monad.html

-- 
Glynn Clements <[EMAIL PROTECTED]>
_______________________________________________
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to