title: How to use 'cons' without generating nested lists in Scheme?
body: <p>While attempting to generate a list of subsets that exist within two sets, I am running into an issue with <strong>cons</strong>. A procedure takes in a list named <strong>result</strong> and attempts to construct a new list out of <strong>result</strong> and the <strong>car</strong> of another set. So far, the set is generated with the correct elements, but they are contained within a size <strong>N</strong> nested list, where N is the number of nestings and the number of elements within the subset for which I am searching. </p>
  
  <p>How can I apply <strong>cons</strong> with <strong>result</strong> without creating a nested list? </p>
  
  <p>Example: </p>
  
  <pre><code>;These are two sets that I will be checking
  (define s1 '(1 2 3 4))
  (define s2 '(1 2 3))
  ;Result from running these lists through my procedure
  (((() . 1) . 2) . 3)
  ;What I want to have generated
  (1 2 3)
  </code></pre>
  
  <p>I need to be able to call <code> (car list)</code> and receive <code>1</code> not <code>((() . 1) . 2)</code></p>