sicp-ex-2.55



<< Previous exercise (2.54) | Index | Next exercise (2.56) >>


Lenatis

 ;; 2.55 
  
  
 ;; (car ''something) is treated by the interpreter as: 
 ;; (car (quote (quote something))) 
 ;; The first occurrency of 'quote' quotes the next entity 
 ;; (quote something),which is actualy a list with two elements,so 
 ;; caring this list yileds 'quote.However,this is just a quoted 
 ;; symbol,not a procedure,typing quote in the interpreter prints: 
  
 quote 
  
 ;; =>(#@keyword . #<primitive-macro! #<primitive-procedure quote>>) 
 ;; whereas typing 'quote just yiled it literally. 
   
  

note that (car '(list 'a)) returns list. Similarly, ''abracadabra is translated as '(quote abracadabra) and car it will return "quote" (the second quote)