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

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

Re: plists, alists, and hashtables


From: Pascal J. Bourguignon
Subject: Re: plists, alists, and hashtables
Date: Fri, 07 Aug 2015 09:34:04 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Ted Zlatanov <tzz@lifelogs.com> writes:

> Right. I agree. My point was different: there is no "keys" function for
> alists and plists.  Keys in those two formats are a convention.

Also, there's rassoc!

    (let ((alist '((:one . 1) (:two . 2) (:three . 3))))
       (list (cdr (assoc  :two alist))
             (car (rassoc 1 alist))))
    --> (2 :one)

Do that with a hash-table!!!

-- 
__Pascal Bourguignon__                 http://www.informatimago.com/
“The factory of the future will have only two employees, a man and a
dog. The man will be there to feed the dog. The dog will be there to
keep the man from touching the equipment.” -- Carl Bass CEO Autodesk


reply via email to

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