Mercurial > hg > xemacs-beta
comparison lisp/cl.el @ 5392:25c10648ffba
#'cadr, #'caddr, #'cadddr; document some equivalences.
lisp/ChangeLog addition:
2011-04-02 Aidan Kehoe <kehoea@parhasard.net>
* cl.el (cadr, caddr, cadddr):
Document some equivalences for these functions.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sat, 02 Apr 2011 16:18:07 +0100 |
parents | 436e67ca8c79 |
children | 97ac18bd1fa3 248176c74e6b |
comparison
equal
deleted
inserted
replaced
5391:f9dc75bdbdc4 | 5392:25c10648ffba |
---|---|
423 (defun caar (x) | 423 (defun caar (x) |
424 "Return the `car' of the `car' of X." | 424 "Return the `car' of the `car' of X." |
425 (car (car x))) | 425 (car (car x))) |
426 | 426 |
427 (defun cadr (x) | 427 (defun cadr (x) |
428 "Return the `car' of the `cdr' of X." | 428 "Return the `car' of the `cdr' of X. Equivalent to `(second X)'." |
429 (car (cdr x))) | 429 (car (cdr x))) |
430 | 430 |
431 (defun cdar (x) | 431 (defun cdar (x) |
432 "Return the `cdr' of the `car' of X." | 432 "Return the `cdr' of the `car' of X." |
433 (cdr (car x))) | 433 (cdr (car x))) |
447 (defun cadar (x) | 447 (defun cadar (x) |
448 "Return the `car' of the `cdr' of the `car' of X." | 448 "Return the `car' of the `cdr' of the `car' of X." |
449 (car (cdr (car x)))) | 449 (car (cdr (car x)))) |
450 | 450 |
451 (defun caddr (x) | 451 (defun caddr (x) |
452 "Return the `car' of the `cdr' of the `cdr' of X." | 452 "Return the `car' of the `cdr' of the `cdr' of X. |
453 Equivalent to `(third X)'." | |
453 (car (cdr (cdr x)))) | 454 (car (cdr (cdr x)))) |
454 | 455 |
455 (defun cdaar (x) | 456 (defun cdaar (x) |
456 "Return the `cdr' of the `car' of the `car' of X." | 457 "Return the `cdr' of the `car' of the `car' of X." |
457 (cdr (car (car x)))) | 458 (cdr (car (car x)))) |
495 (defun caddar (x) | 496 (defun caddar (x) |
496 "Return the `car' of the `cdr' of the `cdr' of the `car' of X." | 497 "Return the `car' of the `cdr' of the `cdr' of the `car' of X." |
497 (car (cdr (cdr (car x))))) | 498 (car (cdr (cdr (car x))))) |
498 | 499 |
499 (defun cadddr (x) | 500 (defun cadddr (x) |
500 "Return the `car' of the `cdr' of the `cdr' of the `cdr' of X." | 501 "Return the `car' of the `cdr' of the `cdr' of the `cdr' of X. |
502 Equivalent to `(fourth X)'." | |
501 (car (cdr (cdr (cdr x))))) | 503 (car (cdr (cdr (cdr x))))) |
502 | 504 |
503 (defun cdaaar (x) | 505 (defun cdaaar (x) |
504 "Return the `cdr' of the `car' of the `car' of the `car' of X." | 506 "Return the `cdr' of the `car' of the `car' of the `car' of X." |
505 (cdr (car (car (car x))))) | 507 (cdr (car (car (car x))))) |