Arc Forumnew | comments | leaders | submitlogin
Can we do this with arc macros too? (brown.edu)
1 point by rincewind 6049 days ago | 3 comments


1 point by almkglor 6049 days ago | link

In principle, yes. To be more specific, you can. Code or it won't happen ^^

Exploratory, exploratory! ^^.

-----

1 point by rincewind 6049 days ago | link

I just wanted to know whether this is possible without using eval. I'll try.

-----

2 points by rincewind 6049 days ago | link

thats it

   (mac spel (name args body)
     `(mac ,name args
       (if (isnt len.args ,(len args))
         (err "wrong number of spel arguments"))
       ((rfn spel-rewrite (b)
         (aif acons.b
           (map spel-rewrite b)
         (pos b ',args)
            args.it
          b)) ',body)))

-----