From: Vassil Nikolov
Subject: asking about the effects of DELETE on vectors
Date: 
Message-ID: <uisznw3ml.fsf@poboxes.com>
I'll appreciate any clarification of these two questions (of
theoretical interest):


17.3 The Sequences Dictionary, the description of the functions for
removing elements from sequences, says:

  When sequence is a vector, delete is permitted to change the
  dimensions of the vector
  ^^^^^^^^^^

Shouldn't this be in the singular?  Or is there a specific meaning
of the plural here, like implying that the dimension or the fill
pointer may be changed?


Also, it says:

  delete, delete-if, and delete-if-not return a sequence of the
  same type as [the argument] sequence

but also

  If sequence is a vector, the result might or might not be simple

---doesn't it follow from the former that the result should be
simple iff the argument is simple?


---Vassil.

P.S.  I did not find any answers by searching comp.lang.lisp for
`delete dimension vector' or `delete vector result type' with
Google.

-- 
For an M-person job assigned to an N-person team, only rarely M=N.

From: Barry Margolin
Subject: Re: asking about the effects of DELETE on vectors
Date: 
Message-ID: <1gdv9.5$1z3.614@paloalto-snr1.gtei.net>
In article <·············@poboxes.com>,
Vassil Nikolov  <········@poboxes.com> wrote:
>
>I'll appreciate any clarification of these two questions (of
>theoretical interest):
>
>
>17.3 The Sequences Dictionary, the description of the functions for
>removing elements from sequences, says:
>
>  When sequence is a vector, delete is permitted to change the
>  dimensions of the vector
>  ^^^^^^^^^^
>
>Shouldn't this be in the singular?  Or is there a specific meaning
>of the plural here, like implying that the dimension or the fill
>pointer may be changed?

I think it was just poor wording.  Since a vector can only have one
dimension, it doesn't make any difference.

>Also, it says:
>
>  delete, delete-if, and delete-if-not return a sequence of the
>  same type as [the argument] sequence
>
>but also
>
>  If sequence is a vector, the result might or might not be simple
>
>---doesn't it follow from the former that the result should be
>simple iff the argument is simple?

The qualification indicates that the simpleness is not part of the type
that's required to be copied.

-- 
Barry Margolin, ······@genuity.net
Genuity, Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.
From: Vassil Nikolov
Subject: Re: asking about the effects of DELETE on vectors
Date: 
Message-ID: <uvg3lelps.fsf@poboxes.com>
    On Mon, 28 Oct 2002 16:06:21 GMT, Barry Margolin <······@genuity.net> said:

    [...]
    VN> Also, it says:
    VN> 
    VN> delete, delete-if, and delete-if-not return a sequence of the
    VN> same type as [the argument] sequence
    VN> 
    VN> but also
    VN> 
    VN> If sequence is a vector, the result might or might not be simple
    VN> 
    VN> ---doesn't it follow from the former that the result should be
    VN> simple iff the argument is simple?

    BM> The qualification indicates that the simpleness is not part of the type
    BM> that's required to be copied.

So if I understand correctly, since `might or might not be simple'
refers to vectors in particular and is thus more specific, it
qualifies the more general stipulation that the returned sequence
have the same type as the argument.

Thank you for the clarification.

---Vassil.

-- 
For an M-person job assigned to an N-person team, only rarely M=N.