MTS 8: LISP and SLIP in MTS
Page Revised February 1979 June 1976
The GENSYM counter can be reset by using the
STATUS function.
Note: An atom created by GENSYM is not placed
in the system OBJECT LIST. Thus, if an atom
with the same PNAME is created during a READ,
it will not refer to the same atom which was
created by GENSYM. The user may remove any
atom from the OBJECT LIST by calling the
function REMOB.
(SET ’GENSET (GENSYM ’ATOM)) = ATOM1
(EQ GENSET ’ATOM1) = NIL
(EQNAME GENSET ’ATOM1) = T
(EXPLODE A) Returns a list of the single-character atoms
of the PNAME of A. A must be a literal atom,
or an IOARG, in which case the PNAME of its
associated buffer will be used. If the buffer
portion of an IOARG is NIL, the system output
buffer will be used.
(IMPLODE LA) Returns an atom whose PNAME is the concatena-
tion of the PNAMEs of the elements of LA. The
atom returned is not on the OBJECT LIST.
Functions That Modify Existing LISP Structures
(SET A1 S1...AN SN) The VALUE of Ai is set to Si for each "i", and
the value returned from SET is the last Si.
(SET ’X ’A ’Y ’(B C)) = (B C),
The VALUE of X is set to A, the VALUE of
Y to (B C).
(RPLACA S1 S2) Replaces the CAR of S1 with S2 and returns the
new structure.
(RPLACA ’(A B C) ’(E F)) = ((E F) B C)
(RPLACD S1 S2) Replaces the CDR of S1 with S2 and returns the
new structure.
(RPLACD ’(A B C) ’(D E)) = (A D E)
Note: RPLACA and RPLACD actually modify the
structures sent to them as arguments, unlike
functions such as CONC, APPEND, and COPY,
which create entirely new structures with the
desired properties. Because of this, RPLACA
and RPLACD should be used with great caution.
It is very easy to create circular LISP
22 LISP