Page:AITR-474.djvu/30

From Wikisource
Jump to navigation Jump to search
This page needs to be proofread.

LAMBDA we use this primarily in the form:

((LAMBDA (ql ... qn) 
         (setq varl ql) 
         (setq varn qn)) valuel ...

which we may think valuen) of as saving values on a temporary stack and then popping them into the variables:

<code for valuel>    ;leaves result in regl 
PUSH regl
...
<code for valuen> 
PUSH regl 
POP varn 
...
POP varl

This is in fact approximately how the MacLISP compiler will treat this construct. This is used to effect the simultaneous assignment of several values to several registers. It would be possible to do without the MacLISP LAMBDA in this case, by using extra intermediate variables, but it was decided that this task was less interesting than other issues within RABBIT, and that assignments of this kind would occur sufficiently compiler to produce The form ((LAMBDA .. ) ..) user wrote such a LAMBDA-body are all CONS is used, among environment. While often that it was desirable to get the MacLISP the best possible code in this case.

CONS CONS is also used in some situation where the form in the SCHEME code, and the arguments and "trivial", in a sense to be defined later. other things, to "push" new values onto the current SCHEME variables can sometimes be represented as temporary MacLISP variables using LAMBDA, in general they must be kept