From: Helmut Eller <eller.helmut@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: until-found
Date: Fri, 11 Dec 2009 17:10:38 +0100 [thread overview]
Message-ID: <m2y6l9h4ox.fsf@gmail.com> (raw)
In-Reply-To: mailman.12661.1260449426.2239.help-gnu-emacs@gnu.org
* 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
next parent reply other threads:[~2009-12-11 16:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.12661.1260449426.2239.help-gnu-emacs@gnu.org>
2009-12-11 16:10 ` Helmut Eller [this message]
2009-12-11 17:35 ` until-found Andreas Röhler
2009-12-10 12:50 until-found Andreas Roehler
2009-12-10 13:58 ` until-found tomas
2009-12-11 10:33 ` until-found Andreas Röhler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2y6l9h4ox.fsf@gmail.com \
--to=eller.helmut@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.