Hi all,<br><br>In order to improve my understanding of monad, I am trying to do some manual computation on &quot;Reader Monad&quot; but I got some problem.<br><br>The computation is like this:<br><br>--instance Monad (Reader e) where 
<br>--&nbsp;&nbsp;&nbsp; return a&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = Reader $ \e -&gt; a <br>--&nbsp;&nbsp;&nbsp; (Reader r) &gt;&gt;= f = Reader $ \e -&gt; f (r e) e <br><br>runReader (do { b &lt;- Reader $ show; return b } )&nbsp; -- This is the initial expression, it should equals &quot;show&quot;
<br><br>runReader (Reader $ show &gt;&gt;= \b -&gt; return b)&nbsp;&nbsp; -- remove do notion<br><br>runReader (Reader $ \e -&gt; return( show e ) e)&nbsp; -- apply the definition of &quot;&gt;&gt;=&quot;<br><br>runReader (Reader $ \e -&gt; (Reader $ \e1 -&gt; show(e)) e)&nbsp; -- apply the definition of &quot;return&quot;
<br><br>But the last expression is incorrect, and I don&#39;t know how to go on.<br><br>Could anyone explain this for me?<br><br>Thanks in advance!<br><br>Reference : <a href="http://www.haskell.org/all_about_monads/html/readermonad.html">
http://www.haskell.org/all_about_monads/html/readermonad.html</a><br>