title: Can somebody walk me through this Haskell function (State monad related)?
body: <pre><code>tick :: State Int Int
  tick = get &gt;&gt;= \n -&gt;
         put (n+1) &gt;&gt;= \y -&gt;
         return n
  </code></pre>
  
  <p>I'm confused as to how <code>put (n+1)</code> has any effect on the end result of this function at all. It seems like this function should return the initial state unchanged. I'm trying to run through this in my mind, but I keep running out of room to hold things in place. :\</p>
  
  <p>If someone could walk me through the evaluation of this function, it would be really helpful.</p>