title: Scheme function using association lists and Mapping
body: <p>I'm trying to create a function in scheme that's called allAssociation. It takes in 2 parameters, a list of symbols and an assoc-list. Calling this function should return a list of data with elements that correspond to the keys of the assoc-list.</p>
  
  <p>Here is an example:</p>
  
  <p>Input:</p>
  
  <pre><code>(allAssociation '(a c d) '((a allen)(b bob)(c (carl cooper))(d doug))) 
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>(allen (carl cooper) doug). 
  </code></pre>
  
  <p>I am trying to use map and lambda to implement this function, but I am a little stumped. </p>
  
  <p>Currently I have this snippet of code:</p>
  
  <pre><code>(define AllAssociation
    (lambda (key alist)
      (if (null? alist)
          '()
          [insert rest of logic]
             )))
  </code></pre>
  
  <p>But I am struggling with implementing the logic of using map to match up each of the elements of the key with the association list. Any help would be much appreciated, for I am very new to scheme. Thank you.</p>