[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A subtle question about naming
From: |
Brendan Halpin |
Subject: |
Re: A subtle question about naming |
Date: |
Tue, 12 Sep 2006 22:08:56 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
"jronald" <followait@163.com> writes:
> Why use auto-mode-alist, but not auto-mode-list?
Because it's an association-list, not just an ordinary list.
Elements of association-lists are cons-pairs, e.g (a . b), and we
can use the assoc function to find matches:
(assoc "potato"
'(("apple" . "fruit") ("potato" . "vegetable") ("icecream" .
"desert")))
evaluates to ("potato" . "vegetable")
Brendan
--
Brendan Halpin, Department of Sociology, University of Limerick, Ireland
Tel: w +353-61-213147 f +353-61-202569 h +353-61-338562; Room F2-025 x 3147
mailto:brendan.halpin@ul.ie http://www.ul.ie/sociology/brendan.halpin.html