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

(third...tenth): Undo change of 2000-08-05.

(second): Make it an alias for `cadr'.
parent 6968a481
...@@ -329,42 +329,39 @@ SEQ, this is like `mapcar'. With several, it is like the Common Lisp ...@@ -329,42 +329,39 @@ SEQ, this is like `mapcar'. With several, it is like the Common Lisp
;;; List functions. ;;; List functions.
(defalias 'first 'car) (defalias 'first 'car)
(defalias 'second 'cadr)
(defalias 'rest 'cdr) (defalias 'rest 'cdr)
(defalias 'endp 'null) (defalias 'endp 'null)
(defmacro second (x) (defun third (x)
"Return the second element of the list LIST."
`(car (cdr ,x)))
(defmacro third (x)
"Return the third element of the list LIST." "Return the third element of the list LIST."
`(car (cdr (cdr ,x)))) `(car (cdr (cdr ,x))))
(defmacro fourth (x) (defun fourth (x)
"Return the fourth element of the list LIST." "Return the fourth element of the list LIST."
`(nth 3 ,x)) `(nth 3 ,x))
(defmacro fifth (x) (defun fifth (x)
"Return the fifth element of the list LIST." "Return the fifth element of the list LIST."
`(nth 4 ,x)) `(nth 4 ,x))
(defmacro sixth (x) (defun sixth (x)
"Return the sixth element of the list LIST." "Return the sixth element of the list LIST."
`(nth 5 ,x)) `(nth 5 ,x))
(defmacro seventh (x) (defun seventh (x)
"Return the seventh element of the list LIST." "Return the seventh element of the list LIST."
`(nth 6 ,x)) `(nth 6 ,x))
(defmacro eighth (x) (defun eighth (x)
"Return the eighth element of the list LIST." "Return the eighth element of the list LIST."
`(nth 7 ,x)) `(nth 7 ,x))
(defmacro ninth (x) (defun ninth (x)
"Return the ninth element of the list LIST." "Return the ninth element of the list LIST."
`(nth 8 ,x)) `(nth 8 ,x))
(defmacro tenth (x) (defun tenth (x)
"Return the tenth element of the list LIST." "Return the tenth element of the list LIST."
`(nth 9 ,x)) `(nth 9 ,x))
......
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