(last): New function.

This commit is contained in:
Richard M. Stallman 1997-08-23 19:10:42 +00:00
parent d370591d58
commit e8c32c9941

View file

@ -78,6 +78,13 @@ BODY should be a list of lisp expressions."
(defsubst cddr (x)
"Return the cdr of the cdr of X."
(cdr (cdr x)))
(defun last (x)
"Return the last element of the list X.
If X is nil, return nil."
(while (cdr x)
(setq x (cdr x)))
x)
;;;; Keymap support.