title: Global variables and list functions
body: <p>Function <code>manageFirstList</code> should recursively copy one element at the time to global list x.</p>
  
  <pre><code>(define test1DataA '(("a" "a") ("b" "b") ("c" "c") ("d" "d") ("e" "ok")))
  (define test1DataB '(("a" "aa") ("b" "bb") ("c" "cc") ("d" "dd") ("ok" "Ir OK!")))
  
  (define x '())
  
  (define manageFirstList
    (lambda (a b)  
      ((cond ((not (null? b))
              ((append x (car a))
               (manageFirstList (cdr a) b)))))))
  
  (define ff (lambda (a b) (manageFirstList a b)))
  
  (ff test1DataA test1DataB)
  </code></pre>
  
  <p>But it causes an error:</p>
  
  <pre><code>car: expects argument of type &lt;pair&gt;; given '()
  </code></pre>
  
  <p>Questions are:</p>
  
  <ol>
  <li>How do I update global value `x'?</li>
  <li>How do I concatenate lists the right way?</li>
  <li><p>Can I call more than 1 function (or is there a workaround) like this:</p>
  
  <pre><code>((append x (car a))
   (manageFirstList (cdr a) b))
  </code></pre></li>
  </ol>
  
  <p>EDIT: What I'm trying to do is to create a list with first value of each test1DataA list item and second value of each test1DataB list item, where test1DataA list element second value is the same as test1DataB first value of its list element.</p>