help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "assoc" for returning ALL associations for a given key


From: Juanma Barranquero
Subject: Re: "assoc" for returning ALL associations for a given key
Date: Tue, 5 May 2009 12:07:58 +0200

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 via email to

[Prev in Thread] Current Thread [Next in Thread]