, . . , , , . :
(defmacro λ- )
, . , . , . , . . , . , , macroexpand:
(macroexpand )
setqq, setq, :
(defmacro setqq (x y)
(list setq x (list quote y)))
>(setqq L (a b c))
(A B C)
> L
(A B C)
:
>(macroexpand (setqq L (a b c))
(setq L (quote (A B C)))
:
1. .
2. , .
3. .
:
1. , . , , (setq x 3). setq , . x , setq, setq .
2. . .
3. , . . . . , , , inline.
4. , , .
5. - .
CONS, CDR, LIST, APPEND . . , `(back quote). . , .
|
|
:
> (1 (+ 3 4) 2)
(1 (+ 3 4) 2)
> (1,(+ 3 4) 2)
(1 7 2)
, , :
>(setf x (ORANGES APPLES))
(ORANGES APPLES)
>(I like,(first x) but not,(second x))
(I LIKE ORANGES BUT NOT APPLES)
. . @ , , , append. .
:
>(setq x (2 3))
(2 3)
>(1, 4)
(1 (2 3) 4)
>(1,@x 4)
(1 2 3 4)
. , . , , setqq :
(defmacro setqq (x y)
(setq,x (quote,y)))