title: Ackermann Function Understanding
body: <p>I'm finding it difficult to understand how the Ackermann Function works. I think my understanding of recursion is flawed? </p>
  
  <p>Here is the code in Python:</p>
  
  <pre><code>  def naive_ackermann(m, n):
      global calls
      calls += 1
      if m == 0:
          return n + 1
      elif n == 0:
          return naive_ackermann(m - 1, 1)
      else:
          return naive_ackermann(m - 1, naive_ackermann(m, n - 1))
  </code></pre>
  
  <p>If I do the function call of naive_ackermann(3,4), how and why do I end up getting 125? </p>
  
  <p>Comments will be appreciated.</p>
  
  <p>Thanks </p>