emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Documentation for car and cdr


From: Mario Domenech Goulart
Subject: Documentation for car and cdr
Date: Tue, 24 Jan 2006 16:55:22 +0000
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Hello,

Currently, the documentation for cdr is:

,----[ M-x describe-function <RET> cdr <RET> ]
| cdr is a built-in function in `C source code'.
| (cdr list)
| 
| Return the cdr of list.  If arg is nil, return nil.
| Error if arg is not nil and not a cons cell.  See also `cdr-safe'.
`----

And, for car, is:

,----[ M-x describe-function <RET> car <RET> ]
| car is a built-in function in `C source code'.
| (car list)
| 
| Return the car of list.  If arg is nil, return nil.
| Error if arg is not nil and not a cons cell.  See also `car-safe'.
`----

Saying "car returns the car" and "cdr returns the cdr" doesn't sound
very useful for me if I would like to know what car and cdr do, unless I
knew what "car" and "cdr" mean (then I wouldn't check the
documentation). :-)

Wouldn't it be better to write something like "Return the first element
of list" and "Return a list containing all but the first element of
list" for car and cdr, respectively?

I found this little "issue" when I was trying to show a friend of mine
the self-documenting features of Emacs: "If you don't know what car
means, for example, you can always check the documentation, so you can
find out that car...  returns the car of a list...". :-) Maybe he
thought lists can drive. :-)


Best wishes,
Mario




reply via email to

[Prev in Thread] Current Thread [Next in Thread]