Vasili I. Galchin wrote:
I would an examples of monads that are pure, i.e. no side-effects.

One view of programming in monadic style is: You call return and >>= all the time. (Either you call it directly, or do notation calls it for you). So if you want to understand whether a monad "has side-effects", you should look at the implementation of return and >>=. If the implementation of return and >>= is written in pure Haskell (without unsafePerformIO or calling C code etc.), the monad is pure.

  Tillmann

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to