I am putting together a macro to generate simple functions of the style:
(defun hello ()
(format t "hello~&"))
Each new function will have hello replaced.
(defmacro generate-echoers (list)
`(let ((list-of-functions
(loop for var in ,list
collect
`(defun ,(intern var) ()
(format t ,(concatenate var "~&"))))))
`(progn
,list-of-functions)))
I developed the above function, which demonstrates conclusively that I have not yet masted quote-times and phases of expansion.
The desired usage is as follows: (generate-echoers '("hi" "ping" "pong")) => ;A list of functions that each say their name, as HELLO does above.