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.

The list p - could be eliminated, and LAMBDA and LABEL expressionsevaluated by substituting the arguments for the variablesin the expression E . Unfortunately, difficulties involvingcollisions of bound variables arise, but they are avoided byusing the list - p.g. Functions kt.h Functions as ~rgumentsThere are a number of useful functions some of whose argumentsare functions. They are especially useful in definingother functions. One such function is maplist[x;f] with an S-expression argument x and an argument f that is a function fromS-expressions to S-expressions. We defineThe usefulness of mgplist is illustrated by formulas for thepartial derivative with respect to x of expressions involvingsums and products of x and other variables. The S-expressionsthat we shall differentiate are formed as follows.I' An atomic symbol is an allowed expression.2. If el,e2, . . . ,en are allowed expressions, PLUS,^^, . . . ,en)TIMES,^^, . . . ,en) are also, and represent the sum and product,andrespectively, of el,...,en. 1This is, essentially, the Polish notation for functions, exceptthat the inclusion of parentheses and commas allows functionsof variable numbers of arguments. An example of an allowedexpression is1For more exact information on arithmetic functions see Section 9.4.

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

Saved successfully!

Ooh no, something went wrong!