From ... Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!news.tele.dk!small.news.tele.dk!129.240.148.23!uio.no!nntp.uio.no!ifi.uio.no!not-for-mail From: Erik Naggum Newsgroups: comp.lang.lisp Subject: Re: if x in (list 1 2 3) Date: 25 Sep 2002 21:46:11 +0000 Organization: Naggum Software, Oslo, Norway Lines: 21 Message-ID: <3241979171035953@naggum.no> References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: maud.ifi.uio.no 1032990371 20301 129.240.65.5 (25 Sep 2002 21:46:11 GMT) X-Complaints-To: abuse@ifi.uio.no NNTP-Posting-Date: 25 Sep 2002 21:46:11 GMT Mail-Copies-To: never User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.lisp:42033 * 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.