From: John Cohen
Subject: newbie's question
Date: 
Message-ID: <8bm3nv$6m8$1@nnrp1.deja.com>
what is the easiest way to tell if (car L) is a member of (cdr L).
I only need T or NIL as output, thanks for advice...


Sent via Deja.com http://www.deja.com/
Before you buy.

From: Thomas A. Russ
Subject: Re: newbie's question
Date: 
Message-ID: <ymizorkuy28.fsf@sevak.isi.edu>
   (find (car L) (cdr L))
or
   (member (car L) (cdr L))

-- 
Thomas A. Russ,  USC/Information Sciences Institute          ···@isi.edu    
From: Pierre R. Mai
Subject: Re: newbie's question
Date: 
Message-ID: <87aejl1g0b.fsf@orion.dent.isdn.cs.tu-berlin.de>
John Cohen <······@my-deja.com> writes:

> what is the easiest way to tell if (car L) is a member of (cdr L).
> I only need T or NIL as output, thanks for advice...

(member (car l) (cdr l))

But what are you really trying to achieve?  Maybe a higher-level
function might be more suitable...

Regs, Pierre.

-- 
Pierre Mai <····@acm.org>         PGP and GPG keys at your nearest Keyserver
  "One smaller motivation which, in part, stems from altruism is Microsoft-
   bashing." [Microsoft memo, see http://www.opensource.org/halloween1.html]