Programming/lisp

lisp backquote / 유사인용

구차니 2013. 1. 19. 23:19
어떻게 보면.. printf()의 기분?

> (defun tt-path (edge)                                               
'(there is a ,(caddr edge) going, (cadr edge) from here.))            
tt-path                                                               
> (tt-path '(garden west door))                                       
(there is a (comma (caddr edge)) going (comma (cadr edge)) from here.) 

> (defun t2-path (edge)                                   
`(there is a ,(caddr edge) going, (cadr edge) from here.))
t2-path                                                   
> (t2-path '(garden west door))                           
(there is a door going west from here.)