title: Combining two lists in C++
body: <p>If I had two lists A and B, how can I add all the elements of B to the beginning of list A, without "emptying" the B list. I basically want to just transfer copies of B list into the beginning of A list. I'm thinking about using insert and want to double check on the syntax.</p>
  
  <p>I know if I was adding it to the end it would be:</p>
  
  <pre><code>A.insert(A.end(), B.begin(), B.end());
  </code></pre>
  
  <p>so to insert it at the beginning would it be:</p>
  
  <pre><code>A.insert(A.begin(), B.begin(), B.end());
  </code></pre>
  
  <p>??</p>