title: Tail recursive functions in Scheme
body: <p>I'm studying for a Christmas test and doing some sample exam questions, I've come across this one that has me a bit stumped</p>
  
  <p><img src="https://i.stack.imgur.com/7iTf8.png" alt="Question"></p>
  
  <p>I can do regular recursion fine, but I can't wrap my head around how to write the same thing using tail recursion.</p>
  
  <p><strong>Regular version:</strong></p>
  
  <pre><code>    (define (factorial X)
        (cond
              ((eqv? X 1) 1)
              ((number? X)(* X (factorial (- X 1))))))
  </code></pre>