Arc Forumnew | comments | leaders | submitlogin
5 points by Pauan 3588 days ago | link | parent

First off, you're seeing the macro-expansion of the "mac" macro, not the macro-expansion of the "test" macro. Try this instead:

  arc> (mac test a `(list ,a))
  arc> (macex '(test a))
Secondly, you can also use "macex1" to only expand it one time:

  arc> (macex1 '(mac test a `(list ,a)))
Sometimes this produces nicer output.


3 points by jsgrahamus 3587 days ago | link

Why does your example return (list (a)) instead of (list a)?

Steve

-----

3 points by akkartik 3587 days ago | link

Rest arg :)

-----

2 points by jsgrahamus 3586 days ago | link

???

-----

3 points by akkartik 3586 days ago | link

  (mac test a `(list ,a))
vs

  (mac test (a) `(list ,a))
Does that help?

-----

3 points by lark 3588 days ago | link

Thank you.

-----