title: Recursive functions with Scheme and how to step with two counters
body: <p>I'd like to have a function that does the following recursively</p>
  
  <pre><code>;f(n) = n, if n&lt;4
  ;f(n) = f(n-1) + 2f(n-2) + 3f(n-3) + 4f(n-4)
  </code></pre>
  
  <p>This is what I came up with but it does not cover the multiplication at each recursive call. I was wondering how one would implement that with Scheme</p>
  
  <pre><code>(define (function n)
    (= counter 0)
    (if (&lt; n 4)
        n
        (+ n (function (- n 1)))))
  </code></pre>