[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

DISPLACE



DISPLACE ought to have a definition something like this:
(DEFUN DISPLACE (X Y)
       (COND ((ATOM Y) Y)
	     ((ATOM X) Y)	;or error
	     (T (RPLACA X (CAR Y))
		(RPLACD X (CDR Y))
		X))))
Then again, what about Stallman's theory of:
(DEFUN DISPLACE (X Y)
       (COND ((ATOM X) Y)
	     (T (RPLACD X (LIST (CONS (CAR X) (CDR X)) Y))
		(RPLACA X 'DISPLACED)
		X)))
(DEFUN DISPLACED FEXPR (X) (CADR X))
?

-------