emacs-devel
[Top][All Lists]
Advanced

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

Re: copy-sequence no longer copies rings


From: Stephen J. Turnbull
Subject: Re: copy-sequence no longer copies rings
Date: Thu, 25 Oct 2007 04:45:01 +0900

David Kastrup writes:

 > If `copy-sequence' allows for dotted lists, so should `length'.  I am
 > not sure I like the implications since every list implicitly is also a
 > dotted list.
 > 
 > To wit:
 > (copy-sequence '(2 3 . (4 5))) creates an element-wise copy of (4 5)
 > while (copy-sequence '(2 3 . [4 5])) would not create an element-wise
 > copy of [4 5].
 > 
 > (length '(2 3 . (4 5))) is 4, while (length '(2 3 . [4 5])) should
 > presumably be 3.

I don't see the problem.  `(2 3 . (4 5))' is just notation; the
structure is `(2 . (3 . (4 . (5 . nil))))'.  The two cases above
surely have lengths 4 and 3 respectively, while the interesting case
is `(2 3 4 . 5)' which I suppose should have length 4, but I'm not
massively invested in it.





reply via email to

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