Do Notation

A SyntacticSugar used in the HaskellLanguage to make use of monads (OnMonads) easier. Instead of writing code like this:

 m1 >>= \x -> m2 >>= \y -> return (x + y)

Haskell programmers can (and usually do) write this:

 do
    x <- m1
    y <- m2
    return (x + y)


EditText of this page (last edited May 16, 2004) or FindPage with title or text search