开发者

How to test if a piece of code refers to a macro in Clojure?

In clojure is there something li开发者_开发技巧ke "is-macro?" to test to see if something is a macro?


Given a var, its metadata can tell you whether it's a macro:

(:macro (meta #'when))
=> true
(:macro (meta #'identity))
=> nil
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜