title: Stack overflow exception when using pipes in tail-recursive function
body: <p>I have a naive implementation of a gameloop</p>
  
  <pre><code>let gameLoop gamestate =     
      let rec innerLoop prev gamestate =
          let now = getTicks()
          let delta = now - prev
          gamestate 
          |&gt; readInput delta
          |&gt; update delta
          |&gt; render delta
          |&gt; innerLoop delta             
  
      innerLoop 0L gamestate 
  </code></pre>
  
  <p>This implementation throws a stackoverflowexception. In my mind this should be tail recursive. I could make a work around like this </p>
  
  <pre><code>let gameLoop gamestate =     
      let rec innerLoop prev gamestate =
          let now = getTicks()
          let delta = now - prev
          let newState = gamestate 
              |&gt; readInput delta
              |&gt; update delta
              |&gt; render delta
  
          innerLoop now newState
  
      innerLoop 0L gamestate  
  </code></pre>
  
  <p>So my question is why the first code example throws a stackoverflow exception.  </p>