MTS 8: LISP and SLIP in MTS
June 1976
(C D E F), and the VALUE of X is
(A B C D E F).
Note: The same changes in structures occur in
GRAFT as in RPLACA and RPLACD. Thus, the
warnings given in the note above apply to
GRAFT as well.
Operations on Property-Lists
Although the property-list of an atom is often treated as an
unordered collection of property-indicators and property-values, in
fact the PLIST of an atom is a normal LISP list of the form
(IND1 PVAL1...INDN PVALN). Examples of these operations follow
each description.
(PUT A,LA IND PVAL)
Gives the atom A, or all the atoms in the list
LA, the property IND with property-value PVAL.
If PVAL is omitted, a system default of T is
used. If an atom already has property IND on
its PLIST, then the previous PVAL associated
with property IND is replaced by the new PVAL.
The value returned from PUT is PVAL.
(PUT ’(A B) ’INCL ’X) = X
The property INCL with property-value X
is put on the PLIST of A and B.
(GET A IND) Returns the property-value associated with the
indicator IND on the PLIST of A. If A does
not have a property EQUAL to IND, GET returns
NIL.
(PUT ’A ’INCL ’(X Y)) = (X Y)
(GET ’A ’INCL) = (X Y)
(GET ’A ’NOTON) = NIL
Assumes NOTON is not on the PLIST of A.
(REM A,LA IND N) Removes up to N occurrences of the property
IND from the PLIST of the atom A, or all the
atoms in the list LA. If N is not given, all
occurrences are removed. The value of REM is
NIL.
(PUT ’A ’INCL ’(X Y)) = (X Y)
(GET ’A ’INCL) = (X Y)
(REM ’A ’INCL) = NIL
(GET ’A ’INCL) = NIL
24 LISP