From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Andreas_R=F6hler?= Newsgroups: gmane.emacs.help Subject: Re: until-found Date: Fri, 11 Dec 2009 18:35:33 +0100 Message-ID: <4B2282E5.7010304@easy-emacs.de> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1260555567 22141 80.91.229.12 (11 Dec 2009 18:19:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 11 Dec 2009 18:19:27 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Helmut Eller Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Dec 11 19:19:19 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NJA5B-0007rM-Vl for geh-help-gnu-emacs@m.gmane.org; Fri, 11 Dec 2009 19:19:14 +0100 Original-Received: from localhost ([127.0.0.1]:46557 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NJA5B-0003LS-KA for geh-help-gnu-emacs@m.gmane.org; Fri, 11 Dec 2009 13:19:13 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NJ9P6-0003J0-W2 for help-gnu-emacs@gnu.org; Fri, 11 Dec 2009 12:35:45 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NJ9P2-0003Cl-Dg for help-gnu-emacs@gnu.org; Fri, 11 Dec 2009 12:35:44 -0500 Original-Received: from [199.232.76.173] (port=59006 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NJ9P1-0003CP-Va for help-gnu-emacs@gnu.org; Fri, 11 Dec 2009 12:35:40 -0500 Original-Received: from moutng.kundenserver.de ([212.227.17.10]:61666) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NJ9P1-0008CU-CP for help-gnu-emacs@gnu.org; Fri, 11 Dec 2009 12:35:39 -0500 Original-Received: from [192.168.178.27] (p54BEAFA2.dip0.t-ipconnect.de [84.190.175.162]) by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis) id 0LwGGE-1O8I2p27aw-017Teq; Fri, 11 Dec 2009 18:35:37 +0100 User-Agent: Thunderbird 2.0.0.19 (X11/20081227) In-Reply-To: X-Provags-ID: V01U2FsdGVkX18CRDlSXYugnkGpKgnF1+ZVahVDDYjpuSHvFCF HWcxTHyIl6l6wm5VlhO1OoOtJHIIU1kdBiLgyBBVfcNDJ6S7XU YRTyfTRC3TNY9edx87mvhzRDx/itFxXU97WDvpw94w= X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:70599 Archived-At: Helmut Eller wrote: > * Andreas Roehler [2009-12-10 13:50+0100] writes: > >> And here my implementation so far: >> >> (defun until-found (search-string liste) >> (let ((liste liste) element) >> (while liste >> (if (member search-string (car liste)) >> (setq element (car liste) liste nil)) >> (setq liste (cdr liste))) >> element)) > > This seems to be the same as: > > (car (member (lambda (element) (member search-string element)) liste)) > > or > > (find-if (lambda (element) (member search-string element)) liste) > > or > > (find search-string liste :test #'member) > > or > > (loop for e in liste if (member search-string e) return e) > > Helmut > Ah, fine stuff, thanks a lot! Andreas