CentralNotice From Wikibooks, open books for an open world < Haskell Jump to navigation Jump to search do notation 1 Translating the then operator 2 Translating the bind operator 2.1 The fail method 3 Example: user-interactive program 4 Returning values 5 Just sugar 6 Notes Monads Prologue: IO, an applicative functor Understanding monads Maybe List do notation IO State Alternative and MonadPlus Monad transformers edit this chapter Using do blocks as an alternative monad syntax was first introduced way back in the Simple input and output chapter. There, we used do to sequence input/output operations, but we hadn't introduced monads yet. Now, we can see that IO is yet another monad. Since the following examples all involve IO , we will refer to the computations/monadic values as actions (as we did in the earlier parts of the book...