I'm trying to write a macro that will let me streamline the definition of multiple top-level variables in one single expression.
The idea was to make it work similar to how let
works:
(defparameters ((*foo* 42)
(*bar* 31)
(*baz* 99)))
I tried using the following, but it doesn't seem to do anything.
(defmacro defparameters (exprs)
(dolist (expr exprs)
(let ((name (car expr))
(exp (cadr expr)))
`(defparameter ,name ,exp))))
I've tried using macroexpand
but it doesn't seem to expand at all.
What am I doing wrong? and how can I fix it?