[plt-scheme] Syntax question (from 4.2.1 of Report)

From: Gregory Woodhouse (gregory.woodhouse at sbcglobal.net)
Date: Tue Jan 3 08:40:57 EST 2006

I'm puzzled by this example from the report

(cond ((assv 'b '((a 1) (b 2))) => cadr)
       (else #f))

which evaluates to 2. I understand that (assv 'b '((a 1) (b 2)))  
evaluates to (b 2), and cadr is an abbreviation for the car of the  
cdr, but don't quite know what to make of the cond expression.

Gregory Woodhouse
gregory.woodhouse at sbcglobal.net

"Before one gets the right answer, one must ask the right question."  
-- S. Barry Cooper

Posted on the users mailing list.