Commit c382fb0a authored by Gerd Moellmann's avatar Gerd Moellmann
Browse files

(caar, cadr, cdar, cddr): Add defsetfs.

parent 3c0ed7ce
......@@ -1523,6 +1523,10 @@ Example: (defsetf nth (n x) (v) (list 'setcar (list 'nthcdr n x) v))."
(defsetf aref aset)
(defsetf car setcar)
(defsetf cdr setcdr)
(defsetf caar (x) (val) (list 'setcar (list 'car x) val))
(defsetf cadr (x) (val) (list 'setcar (list 'cdr x) val))
(defsetf cdar (x) (val) (list 'setcdr (list 'car x) val))
(defsetf cddr (x) (val) (list 'setcdr (list 'cdr x) val))
(defsetf elt (seq n) (store)
(list 'if (list 'listp seq) (list 'setcar (list 'nthcdr n seq) store)
(list 'aset seq n store)))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment