7 The Listener
val
to some other number, and want to know the sum of threeval
s again, you can avoid re-typing the form which computes it. To see how this is done, follow the instructions below.
(setq val 1)
.
val
is now set to 1.
Meta-P
.
PROMPT > (setq val 1)
Meta-P
again, and then press Return.
PROMPT > (+ val val val) 3 PROMPT >Pressing
Meta-P
a second time displayed the second to last form that you evaluated. This time, pressing Return immediately afterwards simply re-evaluates the form. Note that you could have edited the recalled form before evaluating it. You can useMeta-P
repeatedly, recalling any form that you have evaluated in the current session. This time the form evaluates to the number3
, becauseval
changed in the interim.
Generated with Harlequin WebMaker