Code: Select all
(psetf (point-x p) (point-y p)
(point-y p) (point-x p))
Code: Select all
(let ((x (point-x p)))
(setf (point-x p) (point-y p)
(point-y p) x))
Code: Select all
(psetf (point-x p) (point-y p)
(point-y p) (point-x p))
Code: Select all
(let ((x (point-x p)))
(setf (point-x p) (point-y p)
(point-y p) x))
Code: Select all
(defmacro swap (place1 place2)
`(setf ,place1 (prog1 ,place2 (setf ,place2 ,place1))))
Code: Select all
(setf (point-x p) (prog1 (point-y p) (setf (point-y p) (point-x p))))