Major Section: PROGRAMMING
Example LET* Forms: (let* ((x (* x x)) (y (* 2 x))) (list x y))If the forms above are executed in an environment in which
(let* ((x (* x x)) (y (* 2 x)) (x (* x y)) (a (* x x))) (declare (ignore a)) (list x y))
xhas the value
-2, then the respective results are
'(32 8). See let for a discussion of both
let*, or read on for a briefer discussion.
The difference between
let* is that the former binds its
local variables in parallel while the latter binds them
sequentially. Thus, in
let*, the term evaluated to produce the
local value of one of the locally bound variables is permitted to
reference any locally bound variable occurring earlier in the
binding list and the value so obtained is the newly computed local
value of that variable. See let.
In ACL2 the only
declare forms allowed for a
let* form are
ignorable. See declare. Moreover, no variable declared
ignorable may be bound twice (or more).
Let* is a Common Lisp macro. See any Common Lisp
documentation for more information.