开发者

How do you construct a symbol in clojure?

开发者 https://www.devze.com 2023-01-01 21:29 出处:网络
I want to construct a macro that, given a symbol \'foo, creates a method called foo*.How can I 开发者_运维问答concatenate \'foo and \'*?(let [s (symbol \'test)]

I want to construct a macro that, given a symbol 'foo, creates a method called foo*. How can I 开发者_运维问答concatenate 'foo and '*?


(let [s (symbol 'test)] 
  (symbol (str s "*")))


(symbol (str 'foo "*"))
0

精彩评论

暂无评论...
验证码 换一张
取 消