title: Common lisp: what is the return value of prog2?
body: <p>One would expect <code>prog2</code> to differ from <code>prog1</code> and <code>progn</code> in returning the result of evaluating the <em>second</em> expression instead of the <em>first</em> and <em>last</em>, respectively.
  However, the <a href="http://clhs.lisp.se/Body/m_prog1c.htm" rel="nofollow noreferrer">HyperSpec</a> says something different (emphasis mine):</p>
  <blockquote>
  <p><a href="http://clhs.lisp.se/Body/m_prog1c.htm#prog2" rel="nofollow noreferrer">prog2</a> <em><a href="http://clhs.lisp.se/Body/26_glo_e.htm#evaluate" rel="nofollow noreferrer">evaluates</a></em> <em>first-form</em>, then <em>second-form</em>, and then <em>forms</em>, <em>yielding</em> as its only <em><a href="http://clhs.lisp.se/Body/26_glo_v.htm#value" rel="nofollow noreferrer">value</a></em> the <em><a href="http://clhs.lisp.se/Body/26_glo_p.htm#primary_value" rel="nofollow noreferrer">primary value</a></em> <em>yielded</em> by <em><strong>first-form</strong></em>.</p>
  </blockquote>
  <p>That would mean that <code>prog2</code> would return the same (and, in fact, behave much) like <code>prog1</code>!</p>
  <p>Interestingly, the examples in the HyperSpec confirm the <em>expected</em> rather than the <em>specified</em> behaviour:</p>
  <blockquote>
  <pre><code>(setq temp 1) =&gt;  1
  (prog2 (incf temp) (incf temp) (incf temp)) =&gt;  3
  temp =&gt;  4
  (prog2 1 (values 2 3 4) 5) =&gt;  2
  </code></pre>
  </blockquote>
  <p>Is this a typo in the standard or am I missing something deeper?</p>