ch2_1_backquote
This is an old revision of the document!
BACKQUOTE
Backquote expects one argument, typically a list, and can be also invoked with the backquote special character `
. In the example for quote form, the backquote form works the same:
`(a b c) ; backquote here is .. (backquote (a b c)) ; .. same as quote
But in backqouted list, some parts can be switched back to evaluation with comma character (see unquote):
>`(a ,(+ 1 2) c) ; backquoted list (A 3 C) ; form (+ 1 2) evaluated
While with normal quote we would have this:
>'(a ,(+ 1 2) c) ; quoted list (A (UNQUOTE (+ 1 2)) C) ; form (+ 1 2) evaluated
Quote form expects one argument, which is not evaluated, but switched to data and returned as is. For convenience we can use special character '
for quoting, which is expanded to quote form automatically by the reader:
'(a b c) ; these expressions .. (quote (a b c)) ; .. are the same
ch2_1_backquote.1618737903.txt.gz · Last modified: 2021/04/18 03:25 by admin