bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#9082: Add hints to documentation of car and cdr for (e)lisp newcomer


From: Adam Sjøgren
Subject: bug#9082: Add hints to documentation of car and cdr for (e)lisp newcomers
Date: Thu, 14 Jul 2011 21:19:13 +0200
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux)

On Thu, 14 Jul 2011 20:31:32 +0200, Lars wrote:

> address@hidden (Adam Sjøgren) writes:

>> * data.c (car, cdr): add functionality hints to documentation.

> I've applied your patch to Emacs 24, although...

Thanks!

>> DEFUN ("cdr", Fcdr, Scdr, 1, 1, 0,
>> !        doc: /* Return the cdr (rest) of LIST.  If arg is nil, return nil.

> this is kinda still wrong-ish.  I mean, you can take the cdr of a cons
> cell.  The cdr isn't more `rest' then the car is.  However, since the
> documentation says LIST, I guess it's OK.

I see what you mean. I just read 'LIST' and looked at wikipedia¹ and...

Please correct it, if possible ;-)


  Best regards,

    Adam

¹ "When cons cells are used to implement singly linked lists (rather
   than trees and other more complicated structures), the car operation
   returns the first element of the list, while cdr returns the rest of
   the list." - http://en.wikipedia.org/wiki/CAR_and_CDR

-- 
 "Good car to drive after a war"                              Adam Sjøgren
                                                         address@hidden





reply via email to

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