mac name args [body ...]
Creates a macro.
|
>(mac mymac (a b) (+ a b)) #3(tagged mac #<procedure>) |
macex macro
Expands a macro.
|
>(macex '(let a 1 (pr a))) ((fn (a) (pr a)) 1) |
macex1 macro
Expands a macro to one level.
|
>(macex1 '(let a 1 (pr a))) (with (a 1) (pr a)) |
uniq
Generates a unique symbol.
|
>(uniq) gs2863 |
w/uniq names [body ...]
Assigns a unique symbol to each name in
names and executes body. names can either be a single symbol or a list of symbols. |
>(w/uniq (a b c) (prn a b c)) gs2864gs2865gs2866 gs2864 |
quasiquote arg
The backquote
` is shorthand for quasiquote, e.g. `(+ 1 2) is the same as (quasiquote (1 2)). Inside quasiquote, the unquote
operator will cause the contents to be evaluated instead of quoated. The
unquote-splicing operator will cause contents to be evaluated and spliced
into the result. , is shorthand for unquote, and ,@ is shorthand for
unquote-splicing. |
>`((+ 1 2) ,(+ 3 4) ,@(list 5 6)) ((+ 1 2) 7 5 6) |
quote arg
The single quote ' is shorthand for quote, e.g. 'x is the same as (quote x)
|
>'(1 2 3) (1 2 3) |
Copyright 2008 Ken Shirriff.