SCM supports the following constructs from Common Lisp:
gentemp. See Defmacro.
defmacro is extended over that described for SLIB:
(defmacro (macro-name . arguments) body)
is equivalent to
(defmacro macro-name arguments body)
As in Common Lisp, an element of the formal argument list for
defmacro may be a possibly nested list, in which case the
corresponding actual argument must be a list with as many members as the
formal argument. Rest arguments are indicated by improper lists, as in
Scheme. It is an error if the actual argument list does not have the
tree structure required by the formal argument list.
(defmacro (let1 ((name value)) . body) `((lambda (,name) ,@body) ,value)) (let1 ((x (foo))) (print x) x) == ((lambda (x) (print x) x) (foo)) (let1 not legal syntax) error--> not "does not match" ((name value))