title: Why is (type-of list) equal to CONS?
body: <p>I am playing around with Common Lisp and just realized that </p>
  
  <pre><code>(type-of (cons 1 2)) is CONS
  </code></pre>
  
  <p>and</p>
  
  <pre><code>(type-of (list 1 2)) is also CONS
  </code></pre>
  
  <p>However the two are clearly not the same because all "proper" lists, must be conses with second element being a list.</p>
  
  <p>That said, when there are only two elements, the second element is 2, and first element is 1, neither is a list, but the construct is also still called a cons.</p>
  
  <p>This gets even more confusing since </p>
  
  <pre><code>(print (list (cons 1 2)  3)) ; this is a ((1 . 2) 3), an improper list, but still cons
  (print (cons 1 (list 2 3))) ; this is a (1 2 3), a proper list, but still cons
  
  (cons 1 (cons 2 3)) ; is not a proper list, but is a (1 2 . 3), but still cons...
  </code></pre>
  
  <p>All are cons, but why isn't <code>(list 1 2)</code> a list? It can't be a cons because cons and list must be different types in order to be told apart in the algorithm for determining whether or not it is a proper list (and in turn, <code>(equal (list 1 2) (cons 1 2))</code> should be true; without this discrimination, there should be no difference between a cons and a list, there would just be a cons. </p>
  
  <p>Can somebody please help me understand why it says that <code>(type-of (list 1 2))</code> is cons, even though it is clearly a list (otherwise it would be an improper list to my understanding). </p>