progn
progn {form}* → {result}*
forms—an implicit progn.
7.9.2 6 7.4.0 5results—the values of the forms.
7.4.0 3progn evaluates forms, in the order in which they are given.
The values of each form but the last are discarded.
5.3 2If progn appears as a top level form, then all forms within that progn are considered by the compiler to be top level forms.
(progn) → NIL
(progn 1 2 3) → 3
(progn (values 1 2 3)) → 1, 2, 3
(setq a 1) → 1
(if a
(progn (setq a nil) 'here)
(progn (setq a t) 'there)) → HERE
a → NIL
None.
None.
prog1, prog2, Section 3.1 (Evaluation)
Many places in Common Lisp involve syntax that uses implicit progns. That is, part of their syntax allows many forms to be written that are to be evaluated sequentially, discarding the results of all forms but the last and returning the results of the last form. Such places include, but are not limited to, the following: the body of a lambda expression; the bodies of various control and conditional forms (e.g., case, catch, progn, and when). This list could go on and on. Just keep it simple. -kmp&moon 13-Feb-92
\specref{block},
\specref{catch},
\specref{evalwhen},
\specref{let},
\specref{let*},
\macref{multiple-value-bind},
\specref{progv},
\macref{unless},
and \macref{when};
(\eg \specref{block}, \specref{catch}, \specref{eval-when})
and clauses in the
\macref{case},
\macref{ccase},
\macref{cond},
\macref{ctypecase},
\macref{ecase},
\macref{etypecase},
and \macref{typecase}
conditional \term{forms}.