How do I write a macro-defining macro in common lisp
I have about two macros (and climbing) in my codebase that look like this: (defmacro def-stat-method (method-name stat) `(progn (defmethod ,method-name ((monster monster)) (getf (stats monster) ,stat)) (defmethod (setf ,method-name) (value (monster monster)) (setf (getf (stats monster) ,stat) value)))) and this: (defmacro def-energy-method (method-name stat) `(progn (defmethod ,method-name ((monster monster)) (getf (energies monster) ,stat)) (defmethod (setf ,method-name) (value (monster monster)) (setf (getf (energies monster) ,stat) value)))) Each of the macros has the following calling