[Ecls-list] patch for additional clhs compliance
Juan Jose Garcia-Ripoll
jjgarcia at users.sourceforge.net
Tue Apr 1 12:13:31 UTC 2008
On Tue, Apr 1, 2008 at 6:00 AM, Geo Carncross <geocar at gmail.com> wrote:
> I noticed that (PROG2) isn't working the way the CLHS says it should.
>
> >From the CLHS:
>
> prog2 evaluates first-form, then second-form, and then forms, yielding
> as its only value the primary value yielded by first-form.
This must be a typo. If you look at the notes at the bottom of the
specification (http://www.lisp.org/HyperSpec/Body/mac_prog1cm_prog2.html)
you will notice this:
(prog1 form*) == (values (multiple-value-prog1 form*))
(prog2 form1 form*) == (let () form1 (prog1 form*))
Hence, PROG2 returns the primary value of the _second_ form.
Juanjo
--
Facultad de Fisicas, Universidad Complutense,
Ciudad Universitaria s/n Madrid 28040 (Spain)
http://juanjose.garciaripoll.googlepages.com
More information about the ecl-devel
mailing list