Extending the do-notation
Sun, 7 Jan 2001 16:34:53 +0100
> import Monad
> do y <- liftM unzip m1
I'm constantly amazed by the number of tricks one has
to know before he can write concise code using the
do-notation (among other things, I used to write
"x <- return $ m" instead of "let x = m").
Is there a paper demonstrating the most common
coding styles for do-notation ?
Another question concerning the do-notation: I noticed
that most parts of ghc do not use it. Is it because
the code was written before the notation was available,
because the do-notation is too weak to express these
parts, or for another fundamental reason ?