title: Edit A Nested List In Scheme
body: <p>I will keep this short and simple.</p>
  <p>Want: To edit elements in a nested list. This nested list will have an unlimited number of elements but the list inside the list will always have 2 elements, like <code>(list (list 1 2) (list 3 4))</code>. I wanted to add a specific value 'x' to the first element of each nested list using recursion. e.g., <code>(change (list (list 1 2) (list 10 20) 3)</code>, where 3 is the 'x' value =&gt; <code>(list (list 4 2) (list 13 23))</code></p>
  <p>Code:</p>
  <pre><code> (define (change lst x)
        (cond
          [(empty? lst) empty]
          [else (cons (+ (first (first lst)) x)  
  (cons (second (first lst)) (change (rest lst) x)))]))
  </code></pre>
  <p>Output: an input such as <code>(change (list (list 12 2) (list 1 2)) 100)</code> will produce <code>(list 112 2 101 2)</code>.</p>
  <p>Problem: The x value is added, but it should produce <code>(list (list 112 2) (list 101 2))</code>. Itt is not nested.</p>