[Haskell-beginners] Re: [Haskell] Re: Help : A problem with IO

wman 666wman at gmail.com
Mon Dec 15 05:35:24 EST 2008

you probably got it pointed out in haskell-beginners, but in case not:

On Thu, Nov 27, 2008 at 7:10 PM, abdullah abdul Khadir <
abdullah.ak2002 at gmail.com> wrote:

> a) I need to put a do after else for more than one instruction (?)

No, the do thingy is a syntactic sugar for chaining "warm, fuzzy" (the
"preffered" wannabe-joke-term for the presumably scary term monads/monadic)

it allows you to write in "classical" imperative/sequential style instead of
chaining operations manually (using the >> and >>= operators, which the do
notation translates into anyway). lookup some monad tutorials/docs.

you are right in that if there is only one operation, no transformation is
needed, so the do is unnecessary.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/beginners/attachments/20081215/cb2fd47b/attachment.htm

More information about the Beginners mailing list