title: while loop in racket?
body: <p>I am familiar with while loops in other languages but here I have written a small function that computes the derivative of a sum of terms but it only does the first 2 I was wondering if there was a way to alter this to take into account more than 2?</p>
  
  <p>expressions, <code>E</code>, are represented as lists so <code>2x + 2y + x^3</code> is represented as <code>(+ (* 2 x) (* 2 y) (expt x 3))</code></p>
  
  <p>note that I already have functions written to compute the exponential but it is part of a sum and it stops after the first 2</p>
  
  <pre><code>(define (make-sum v1 v2)
    (list '+ v1 v2))
  
  (define (diff-sum x E)
    (make-sum (diff x (first-operator E)) (diff x (last-operator E))))
  </code></pre>