[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: choose! and choose
- To: Jonathan Bachrach <Jonathan.Bachrach@ircam.fr>
- Subject: Re: choose! and choose
- From: moon (David A. Moon)
- Date: Wed, 23 Dec 92 12:06:12 EST
- Cc: info-dylan@cambridge.apple.com
> Date: Sun, 20 Dec 1992 18:36:53 +0100
> From: Jonathan Bachrach <Jonathan.Bachrach@ircam.fr>
>
> Date: Fri, 18 Dec 92 18:09:25 EST
> From: moon@cambridge.apple.com (David A. Moon)
>
> > Date: Fri, 4 Dec 1992 18:12:25 +0100
> > From: Jonathan Bachrach <Jonathan.Bachrach@ircam.fr>
> > ...
> > I would also like to see the following destructively functions added:
> > (define-generic-function choose! (predicate mutable-sequence))
> > (define-generic-function choose-by! (predicate test-sequence mutable-value-sequence))
>
> I don't understand what you propose these will do.
>
> They would be more powerful `remove!' functions that take a general
> predicate instead of an element to remove (as in `remove!'). They
> would mutate the mutable-sequence such that only the ``chosen''
> elements remain. They return the mutated argument.
Now I see what you mean. That seems like a reasonable idea.