From: Thomas F. Burdick
Subject: Re: Still a Newbie - Existence in a list?
Date: 
Message-ID: <xcvd6xwwdgu.fsf@conquest.OCF.Berkeley.EDU>
TejimaNoHimitsu <····@test.com> writes:

> I know... I already asked one question of this group.... but damnit, I
> need to ask another (or two!) ;)
> 
> Is there a really easy way to check if an element exists in a list?  I
> know I could do (member 'b '(a b c)) but what about a more complex
> list?  For example...
> 
> '(b a (t y (q w (z c)) v) d)  and I wanted to check to see if the
> element v is in there.

(b a (t y (q w (z c)) v) d) is not a list.  Well, actually it is, but
its elements are:

  b
  a
  (t y (q w (z c)) v)
  d

So, you've got this structure made of cons cells, and you want to view
it as a tree.  Okay, that's fine, but just know that "tree" isn't
spelled l-i-s-t :).

> Is there a lisp function that does this?  I don't think there is,
> but I thought it couldn't hurt to ask the experts :)

No, except for copy-tree and tree-equal, CL doesn't really provide
operations to work on trees.

-- 
           /|_     .-----------------------.                        
         ,'  .\  / | No to Imperialist war |                        
     ,--'    _,'   | Wage class war!       |                        
    /       /      `-----------------------'                        
   (   -.  |                               
   |     ) |                               
  (`-.  '--.)                              
   `. )----'                               
From: Joe Marshall
Subject: Re: Still a Newbie - Existence in a list?
Date: 
Message-ID: <0ENm8.36325$44.11592538@typhoon.ne.ipsvc.net>
"Thomas F. Burdick" <···@conquest.OCF.Berkeley.EDU> wrote in message
····················@conquest.OCF.Berkeley.EDU...
>
> No, except for copy-tree and tree-equal, CL doesn't really provide
> operations to work on trees.
>

sublis and nsublis, too