In Lisp, how do you call, from a macro, a function whose name is the symbol value of a symbol? I might be wrong but I think I'm right that a symbol is a variable.
Here is what I currently have:
(defmacro cfunc (a b) (list a b))
(defparameter foo 'my-func)
(defun my-func (data) '(some-code))
(cfunc foo data) ;does not work
(cfunc my-func data) ;works
I'm thinking I need to add some special character in front of foo to evaluate to its symbol value before being treated as a function. (cfunc foo data) creates and calls the function (foo data) instead of (my-func data). I suppose I could change the function defining in cfunc instead.
#'foo doesn't work, that gives (function foo) which cfunc returns and calls ((function foo) data). (symbol-value foo) can't work either. So I'm thinking I can't change what is given to cfunc but I can change the code of the function cfunc makes.
If someone has a specific page of a resource that tells me about evaluation and expansion using defmacro or the specifics of the special characters like # and ' or know the keywords I should be looking up, I'd appreciate it if that could be shared as well.