unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Juanma Barranquero <lekktu@gmail.com>
To: florian <lorian@fsavigny.de>
Cc: help-gnu-emacs@gnu.org
Subject: Re: "assoc" for returning ALL associations for a given key
Date: Tue, 5 May 2009 12:07:58 +0200	[thread overview]
Message-ID: <f7ccd24b0905050307s4d610b92mfa0dd14e3872d273@mail.gmail.com> (raw)
In-Reply-To: <7b7011d7-2f03-4a08-ae58-6701999d637d@v4g2000vba.googlegroups.com>

On Tue, May 5, 2009 at 10:59, florian <lorian@fsavigny.de> wrote:

> But I am wondering whether that would have been necessary - perhaps I
> am overlooking something?

If you use the CL package (included in Emacs), `remove*' and friends
can be used for that:

  (remove* nil ALIST :key '(lambda (item) (equal (car item) KEY)))
  (remove-if-not (lambda (item) (equal item KEY)) ALIST :key 'car)

etc.

    Juanma




  reply	other threads:[~2009-05-05 10:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-05  8:59 "assoc" for returning ALL associations for a given key florian
2009-05-05 10:07 ` Juanma Barranquero [this message]
2009-05-05 10:15 ` Pascal J. Bourguignon
2009-05-06 10:10 ` Nikolaj Schumacher

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f7ccd24b0905050307s4d610b92mfa0dd14e3872d273@mail.gmail.com \
    --to=lekktu@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=lorian@fsavigny.de \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).