| (follow up to http://arclanguage.org/item?id=13386) So I'm trying to build macro-alias: (mac macro-alias(a b)
`(mac ,a args
`(,,b ,@args)))
But that ,,b doesn't work. arc> (macex1 '(macro-alias foo1 foo2))
(mac foo1 args `(,foo2 ,@args))
(cleaning up the calls to quasiquote and friends for clarity)Replacing ,,b with ,b doesn't work either: (mac macro-alias(a b)
`(mac ,a args
`(,b ,@args)))
arc> (macex1 '(macro-alias foo1 foo2))
(mac foo1(&rest args) `(,b ,@args))
This seems like a general-enough macro trick. Anybody care to provide the solution that doesn't involve retreating from the nested backtick? (cons ,b args)
(Ignoring gensym'ing args for now.) |