Why does the first macro unquote-splicing
not produce (quasiquote (unquote (quasiquote 1 2)))
, but the second example replaces the value?
(define x (list 1 2))
(t '(quasiquote (unquote (quasiquote (unquote-splicing x))))
(quasiquote (quasiquote (unquote (quasiquote (unquote-splicing x))))))
(t '(quasiquote (unquote (quasiquote (unquote (1 2)))))
(quasiquote (quasiquote (unquote (quasiquote (unquote (unquote x)))))))
In the first example
This has 3 quasiquotes and 2 unquotes, so 'x' will not be evaluated.
in the second example
there are 3 quasiquotes and 3 unquotes so 'x' will be replaced by it's value.