title: calculate sum of multiples of 3 & 5 below 1000
body: <p>I have written the following program to calculate the sum of all multiples of 3 &amp; 5 below 1000 in scheme. However, it gives me an incorrect output.
  Any help would be much appreciated.</p>
  
  <pre><code>(define  (multiples)
     (define  (calc  a sum ctr cir)
        (cond (&gt; a 1000) (sum)
              (= ctr 7) (calc (+ a (list-ref cir 0)) (+ sum a) 0 (list 3 2 1 3 1 2 3))
               (else (calc (+ a (list-ref cir ctr)) (+ sum a) (+ 1 ctr) (list 3 2 1 3 1 2 3)))))
      (calc 0 0 0 (list 3 2 1 3 1 2 3)))
  </code></pre>