title: Quoting in Common Lisp
body: <p>I started to learn lisp recently. I was going over the examples in the book <a href="http://books.google.co.cr/books?id=zJGVnUKijzYC&amp;printsec=frontcover&amp;dq=Land%20of%20Lisp&amp;hl=en&amp;sa=X&amp;ei=ebKJUonMLtCLkAfMpYHYBA&amp;redir_esc=y#v=onepage&amp;q=Land%20of%20Lisp&amp;f=false" rel="nofollow">Land of Lisp</a> and I felt that I was understanding everything rather well until I arrived to the following example around chapter 7:</p>
  
  <pre><code>(defun quote-it (x)
    (list 'quote x))
  </code></pre>
  
  <p>Now, I know that <code>list</code> would create a list with its arguments, like in <code>(list 1 2 3 4)</code> would evaluate to the list <code>(1 2 3 4)</code>.</p>
  
  <p>And I also know that <code>quote</code> allows me to quote an argument, pretty much like I can do with <code>'</code>. And so <code>'east</code> is the same as <code>(quote east)</code></p>
  
  <p>Now, interestingly, the function above does not return a list, but simply quotes whatever I pass to it. And so, if I call it</p>
  
  <p><code>(quote-it east)</code> it would simply return <code>'east</code> and not <code>('east)</code></p>
  
  <p>If I had done this, I would have written the function as </p>
  
  <pre><code>(defun quote-it (x) 
    (quote x))
  </code></pre>
  
  <p>And so, I have no clue why we write the command as <code>'quote</code> in <code>(list 'quote x)</code> in the example from the book.</p>
  
  <p>I know I can switch between code and data by using quotes, like <code>'(+ 1 2)</code>, but in this case it looks like my intention is to actually apply the quote function here. So, why <code>(list 'quote x)</code>?</p>
  
  <p>So, can somebody out there with more experience clarify this?</p>