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

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

alist and multiple values for one key


From: Norbert C.
Subject: alist and multiple values for one key
Date: 20 Jan 2003 05:03:35 -0800

Hi,

       I would lile to find the "good way" to retrieve multiple values
for a given key in an alist.

       But I didn't find a natural way to do it. For example :
(setq trees '((pine . cones) (pine . acorns) (oak . acorns) (maple .
seeds)))
==> ((pine . cones) (pine . acorns) (oak . acorns) (maple . seeds))
(assoc 'pine trees)
==> (pine . cones)

What I'd like is something that returns each value associated with
'pine.

Any thought ?

Thank you,

Norbert


reply via email to

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