Arc Forumnew | comments | leaders | submitlogin
3 points by bramsundar 6116 days ago | link | parent

I don't think so. Couldn't you just have use's macroexpansion add a global variable named foo?


2 points by bogomipz 6115 days ago | link

Yes, I thought of that after I wrote the comment. Avoiding repetitions like this is exactly what macros are for. I guess I'm not used to thinking in lisp yet.

pau wants 'use to be a function, though, so there would have to be a separate macro, or the other way around, or something.

-----

2 points by almkglor 6115 days ago | link

  (def function-that-assigns-one-to-a-global-symbol-of-your-choice (s)
    (eval `(= ,s 1)))

-----