Skip to content
Discussion options

You must be logged in to vote

The as-macro macro is a hack for this.

(import my-other-module)

(defmacro my-second-macro
  [x y z]
  ~(+ ,x
      (,my-other-module/some-fn ,y)
      (as-macro ,my-other-module/first-macro ,z)))

It allows you to use the same unquote trick for hygiene on macros as you use on functions. Note that as-macro is not unquoted.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@bakpakin
Comment options

@tupini07
Comment options

Answer selected by bakpakin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants