Hi,
I'm trying to implement a macro that creates both a struct and a function. The following code template:
Regards,
Luis.
I'm trying to implement a macro that creates both a struct and a function. The following code template:
(defmacro macro-example (...)
`(defstruct ...)
`(defun ....))
doesn't work since only the last element is actually evaluated and, therefore, the function is defined but the structure is not created. As a solution I could define a function that calls two macros: one for the function and another one for the struct but I was wondering if there is a way to do both things with just one macro. In other words, is it possible to generate two different pieces of code from one single macro?Regards,
Luis.