"The Ripper" <·············@yahoo.yasabescomoacaba> writes:
> It's only removing an element from a list. The list contains integer
> numbers.
Common Lisp has REMOVE, REMOVE-IF, etc. You should be able to do
(the following is with Allegro CL):
USER(5): x
(10 11 12 13 14 15)
USER(6): (remove-if #'oddp x)
(10 12 14)
USER(7): (remove 13 x)
(10 11 12 14 15)
Does it help?
--
Oleg Goldshmidt | BLOOMBERG L.P. (BFM) | ····@bfr.co.il
"... We work by wit, and not by witchcraft;
And wit depends on dilatory time." - W. Shakespeare.
Oleg Goldshmidt <····@NOSPAM.bfr.co.il> writes:
> > It's only removing an element from a list. The list contains integer
> > numbers.
>
> Common Lisp has REMOVE, REMOVE-IF, etc. You should be able to do
> (the following is with Allegro CL):
...and if you don't remember the name:
(apropos :remove :common-lisp)
--
(espen ;-)
From: The Ripper
Subject: Re: How can I remove an element from a list?
Date:
Message-ID: <85d6kd$b892@esiami.tsai.es>
Thank you very much for your answers, Oleg and Espen.
I'm using the Apterix Lisp 1.04 (an interpreter) and the remove command
works fine!
I can't say the same for remove-if but what I needed was a remove function.
Thanks again.
Espen Vestre escribi� en mensaje ...
>Oleg Goldshmidt <····@NOSPAM.bfr.co.il> writes:
>
>> > It's only removing an element from a list. The list contains integer
>> > numbers.
>>
>> Common Lisp has REMOVE, REMOVE-IF, etc. You should be able to do
>> (the following is with Allegro CL):
>
>...and if you don't remember the name:
>
>(apropos :remove :common-lisp)
>
>--
> (espen ;-)
From: ····@my-deja.com
Subject: Re: How can I remove an element from a list?
Date:
Message-ID: <85e57u$7ft$1@nnrp1.deja.com>
On EmacsLisp I can do this:
(setq l (list ?a ?b ?c))
=>(97 98 99)
(setq l (delq ?a l))
=>(98 99)
In article <···········@esiami.tsai.es>,
"The Ripper" <·············@yahoo.yasabescomoacaba> wrote:
> Thank you very much for your answers, Oleg and Espen.
>
> I'm using the Apterix Lisp 1.04 (an interpreter) and the remove
command
> works fine!
> I can't say the same for remove-if but what I needed was a remove
function.
>
> Thanks again.
>
> Espen Vestre escribi� en mensaje ...
> >Oleg Goldshmidt <····@NOSPAM.bfr.co.il> writes:
> >
> >> > It's only removing an element from a list. The list contains
integer
> >> > numbers.
> >>
> >> Common Lisp has REMOVE, REMOVE-IF, etc. You should be able to do
> >> (the following is with Allegro CL):
> >
> >...and if you don't remember the name:
> >
> >(apropos :remove :common-lisp)
> >
> >--
> > (espen ;-)
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.