Path: utzoo!attcan!uunet!husc6!mailrus!cornell!uw-beaver!uw-june!whaley From: whaley@june.cs.washington.edu (Ken Whaley) Newsgroups: comp.lang.lisp Subject: assoc in KCL Message-ID: <6341@june.cs.washington.edu> Date: 4 Nov 88 22:06:57 GMT Reply-To: whaley@uw-june.UUCP (Ken Whaley) Organization: U of Washington, Computer Science, Seattle Lines: 23 Much to my dismay, I've found that the KCL we have here does NOT have the keyword ":key" in the "assoc" function. Since I obviously have to write my own (I suppose there's the danger of replicating "the best way to sum a list" discussion....I'm not terribly interested in the "best" way of doing this, I just want to know the "right" way). CLtL isn't clear as to how assoc uses the keywork ":key": assoc item a-list &key :test :test-not :key [Function] I.e., exactly which things does :key get applied to? In Allegro 3.0, it seems to apply only to the items in the a-list. I.e., (assoc 'a '( ((c) . d) ((a) . b)) :key #'car :test #'equal) ==> ((a) . b) Is this correct? Ken -- whaley@june.cs.washington.edu