title: Haskell - depth for each node in binary tree using Reader monad
body: <p>I wrote the following code. It is working and using the <code>Reader</code> monad.</p>
  
  <p>Could you give me some hints about code style in Haskell ? Mainly, I mean monads -- I am newbie.  </p>
  
  <pre><code>import Control.Monad.Reader
  
  data Tree a = Node a (Tree a) (Tree a)
              | Empty
  
  renumberM :: Tree a -&gt; Reader Int (Tree Int)
  renumberM (Node _ l r) = ask &gt;&gt;= (\x -&gt; 
                           return (Node x (runReader (local (+1) (renumberM l)) x) 
                                          (runReader (local (+1) (renumberM r)) x)))
  renumberM Empty = return Empty
  
  renumber'' :: Tree a -&gt; Tree Int
  renumber'' t = runReader (renumberM t) 0
  </code></pre>