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

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

Re: elisp - anonymous function in an association list?


From: Johan Bockgård
Subject: Re: elisp - anonymous function in an association list?
Date: Fri, 30 Nov 2007 01:08:06 +0100
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux)

apatheticagnostic <apatheticagnostic@gmail.com> writes:

> Sorry for the double-post but I wanted to point out that it works with
> just (funcall (car (cdr (assoc x sample-list)))) and doesn't seem to
> need the eval.

If you use this form there is no need for `car'

     (setq alist '((a . 1) (b . 2)))
     (cdr (assoc 'b alist))
        =>  2

(Also, (car (cdr X)) == (cadr X).)

-- 
Johan Bockgård


reply via email to

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