Re: Two questions about prog2



On Mar 31, 11:35 am, Spiros Bousbouras <spi...@xxxxxxxxx> 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, I take it you didn't search this newsgroup
before posting.

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

The code generated by the compiler
may not be the same, but the effect
should be.

---
Geoff
.



Relevant Pages

  • Re: Lame question about instance variable and attribute
    ...  Does the ruby interpretter take a different path in yielding ... I'm just curious if the interpretter takes extra steps when yielding ...   attr_reader:foo ...   def initialize ...
    (comp.lang.ruby)
  • Re: yield vs. return
    ... yielding is more elegant than return, but I don't consider this to ...   yield foo if block_given? ...
    (comp.lang.ruby)
  • 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: Two questions about prog2
    ... prog2 evaluates first-form, then ... 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)