Quote, Quasiquote and Symbolic Data
(quote a) ; a
'a ; a
'(1 2 (3 4)) ; (1 2 (3 4))
(car '(quote x)) ; quote: 'x is literally (quote x)
(define n 5)
`(n is ,n) ; (n is 5)
`(sum ,(+ 1 2) list ,@(list 4 5)) ; (sum 3 list 4 5)
`#(1 ,(+ 1 1)) ; #(1 2): quasiquote works in vectors
`(1 `(2 ,(3 ,(+ 1 3)))) ; nested quasiquote: (1 `(2 ,(3 4)))
;; Building code with quasiquote
(define (make-adder-expr n) `(lambda (x) (+ x ,n)))
(make-adder-expr 10) ; (lambda (x) (+ x 10))