[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: copy-sequence no longer copies rings
From: |
David Kastrup |
Subject: |
Re: copy-sequence no longer copies rings |
Date: |
Wed, 24 Oct 2007 11:08:20 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux) |
address@hidden (Johan Bockgård) writes:
> Richard Stallman <address@hidden> writes:
>
>> Perhaps we should make `copy-sequence' copy dotted lists. They are
>> not sequences, but that doesn't necessarily mean `copy-sequence' must
>> refuse to copy them.
>
> XEmacs' version explicitly allows this
>
> Documentation:
> Return a copy of list, vector, bit vector or string SEQUENCE.
> The elements of a list or vector are not copied; they are shared
> with the original. SEQUENCE may be a dotted list.
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.
--
David Kastrup
- copy-sequence no longer copies rings, Michael Kifer, 2007/10/22
- Re: copy-sequence no longer copies rings, Juanma Barranquero, 2007/10/22
- Re: copy-sequence no longer copies rings, Richard Stallman, 2007/10/23
- Re: copy-sequence no longer copies rings, Michael Kifer, 2007/10/23
- Re: copy-sequence no longer copies rings, Richard Stallman, 2007/10/23
- Re: copy-sequence no longer copies rings, Johan Bockgård, 2007/10/24
- Re: copy-sequence no longer copies rings,
David Kastrup <=
- Re: copy-sequence no longer copies rings, Stephen J. Turnbull, 2007/10/24
- Re: copy-sequence no longer copies rings, David Kastrup, 2007/10/25
- Re: copy-sequence no longer copies rings, Stephen J. Turnbull, 2007/10/26
- Re: copy-sequence no longer copies rings, David Kastrup, 2007/10/26