Re: Two questions about prog2



Spiros Bousbouras wrote:
1) The HS page on prog2 says:

prog2 evaluates first-form, then
second-form, and then forms,
yielding as its only value the primary
value yielded by first-form.

Is the last word meant to be "second-form"
instead of "first-form" ?
Yes; the Syntax and Arguments and Values sections get it right though.

2) Is (prog2 form1 form*) the same as
(progn form1 (prog1 form*)) ?
Yes.
.



Relevant Pages

  • Two questions about prog2
    ... The HS page on prog2 says: ... yielding as its only value the primary ... value yielded by first-form. ... Is the last word meant to be "second-form" ...
    (comp.lang.lisp)
  • Re: DEFSTRUCT and lexical environment
    ... "prog2 evaluates first-form, then second-form, and then forms, yielding ...
    (comp.lang.lisp)
  • Re: Two questions about prog2
    ...     prog2 evaluates first-form, ...     yielding as its only value the primary ...     value yielded by first-form. ... Is the last word meant to be "second-form" ...
    (comp.lang.lisp)
  • Re: CLHS bug? (PROG2)
    ... "prog2 evaluates first-form, then second-form, and then forms, yielding ... (Emphasis mine) ... Shouldn't PROG2 be returning the primary value returned by second-form? ...
    (comp.lang.lisp)
  • Re: CLHS bug? (PROG2)
    ... "prog2 evaluates first-form, then second-form, and then forms, yielding ... (Emphasis mine) ... Shouldn't PROG2 be returning the primary value returned by second-form? ...
    (comp.lang.lisp)