Subject: Re: if x in (list 1 2 3)
From: Erik Naggum <erik@naggum.no>
Date: 25 Sep 2002 21:46:11 +0000
Newsgroups: comp.lang.lisp
Message-ID: <3241979171035953@naggum.no>

* Thomas Guettler
| Is ther an "in" operator which does the following:
| 
| (if x in (list 1 2 3))
| 
| This should return true if x is 1, 2 or 3.

  The function you want is one of `member´, `find´, or even `position´.

  If you want more syntactically convenient support, consider `case´ and its
  friends `ccase´ and `ecase´:

(case x
  ((1 2 3) ...)
  (t ...))

-- 
Erik Naggum, Oslo, Norway

Act from reason, and failure makes you rethink and study harder.
Act from faith, and failure makes you blame someone and push harder.