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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

defl[x;e] -The function - defl puts a pointer to the expression e onthe rest of the list x from the point where it finds the attributePRO. If no such attribute is found, one is created,The value of - defl is x, In practice, PRO is usually pairedwith EXPR on the p-list,- defl is equivalent to the following (where the programfeature has been used)A[ 6x;el; ] where is the following program with no programvariables,rplaca6prop&x;~~0;h66 () 1 jcdr[attrib[x;list[pro;~~~] 11 ]] je)return[xlThus the association list will end up with PRO pointing to e asfollows :at trib[x; e 1 : rnachf ne languageThe function attrib concatenates its two arguments bychanging the last element of its first argument to point to thesecond argument, Thus it is commonly used to tack somethingonto the end of an association list. The value of attrib is thesecond argument. For exampleattrib[FF, (EXPR, (LADD~DA, (x), (COMD~((AToM~x),~),(T, (FF, CAR,^) ) ) ) ) ) 1would put EXPR followed by the LAMBDA expression for FF ontothe end of the association list fop FF.attrfb can be used to define a function provided no otherdefinition comes earlfer on the functionOs association lfst,but in general it is better to use define,

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

Saved successfully!

Ooh no, something went wrong!