Next: Removing Alist Entries, Previous: Adding or Setting Alist Entries, Up: Association Lists
assq, assv and assoc find the entry in an alist
for a given key, and return the (key . value) pair.
assq-ref, assv-ref and assoc-ref do a similar
lookup, but return just the value.
Return the first entry in alist with the given key. The return is the pair
(KEY . VALUE)from alist. If there's no matching entry the return is#f.
assqcompares keys witheq?,assvuseseqv?andassocusesequal?.
Return the value from the first entry in alist with the given key, or
#fif there's no such entry.
assq-refcompares keys witheq?,assv-refuseseqv?andassoc-refusesequal?.Notice these functions have the key argument last, like other
-reffunctions, but this is opposite to what whatassqetc above use.When the return is
#fit can be either key not found, or an entry which happens to have value#fin thecdr. Useassqetc above if you need to differentiate these cases.