combining two variables into one function name in macro

后端 未结 4 1285
没有蜡笔的小新
没有蜡笔的小新 2020-12-11 22:18

I was toying around with macros and clos, where I created an \"object\" macro to create instances

(defmacro object (class &rest args)
  `(make-instance \         


        
4条回答
  •  醉话见心
    2020-12-11 22:44

    Try playing with something like this:

    (let ((a 'a)
          (dash '-)
          (b 'b))
     `(,a,dash,b))
    

    The other possibilities is to use intern, or more user friendly, alexandria's symbolicate.

提交回复
热议问题