10.07.2015 Views

LISP I Programmer's Manual - Software Preservation Group

LISP I Programmer's Manual - Software Preservation Group

LISP I Programmer's Manual - Software Preservation Group

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

5 = (atomic function, arguments): Cf. Example 4, Section 4.1--the APPLY operator evaluates the atomic function as describedpreviously, and the result is the value of f.5 = (special form, arguments): See the description below ofspecial forms. The value of f is the value given by APPLYafter evaluating the special form.= (atomic symbol): Note the difference between this whichis enclosed in parentheses and the first given above,The APPLY operator performs the function given within theparentheses. For example % = (READ), when operated on byAPPLY would cause a list to be read from cards.5 = (LABEL, t ,F): The APPLY operator carries out the evaluationof the compound LABEL function as described below.The value of f as given by APPLY is the labelling name, t.Recall that in all the LAMBDA cases, the dummy variableshave been paired and put on the p-list before the formis evaluated,If the S-expression for a compound function begins withLABEL, the triplet for the APPLY operator will bef: (LABEL,name,definition)x: (list of arguments)P: (list of pairs)(see Example 5, Section 4.1) The APPLY operator pairs the atomicsymbol for the name of the function (the second element inthe LABEL list), with the definition and adds the pair to thefront of the p-list, It then applies the definition to the listof arguments x using the enlarged p-list, and the result is thevalue of the function.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!