我想創建一個clojure宏,將輸入的符號轉換爲字符串。然而,當我這樣做:Clojure宏字符串評估
(defmacro convert-to-string [something]
`(call-converted "~something")
)
(macroexpand '(convert-to-string convert-this))
:我得到:
(call-converted "~something")
:不是:
(call-converted "~convert-this")
:有沒有人告訴我,我怎麼能做到這一點?
你確定這需要做個宏? – spacemanaki 2011-03-21 12:21:20