Re: Anonymous Macros

2012-11-06 Thread Alex Baranosky
Yep. `macro-let` is what you're looking for. On Tue, Nov 6, 2012 at 10:41 PM, Baishampayan Ghose wrote: > Take a look at tools.macro/macrolet. > > https://github.com/clojure/tools.macro/ > > Regards, > BG > > Sent from phone. Please excuse brevity. > On 6 Nov 2012 19:10, "Sean Neilan" wrote: > >

Re: Anonymous Macros

2012-11-06 Thread Baishampayan Ghose
Take a look at tools.macro/macrolet. https://github.com/clojure/tools.macro/ Regards, BG Sent from phone. Please excuse brevity. On 6 Nov 2012 19:10, "Sean Neilan" wrote: > I was hoping to write a macro inside of a let statement. The macro would > be returned from the let and keep closures to

Re: Anonymous Macros

2012-11-06 Thread jaime
Well, logically the difference between a function and macro is just that the parameters will be evaluated in a function call but will not in a macro call. I suppose you can use anonymous function to achieve what you may want in a LET statement. And as SunNing said, Clojure will use meta tag ":

Re: Anonymous Macros

2012-11-06 Thread Sean Neilan
I was hoping to write a macro inside of a let statement. The macro would be returned from the let and keep closures to whatever was defined in the let. Also, if possible, define multiple global macros inside of a let statement so it's as if the let is returning multiple values. On Tue, Nov 6, 201

Re: Anonymous Macros

2012-11-06 Thread Sean Neilan
I was hoping to write a macro inside of a let statement. The macro would be returned from the let and keep closures to whatever was defined in the let. Also, if possible, define multiple global macros inside of a let statement so it's as if the let is returning multiple values. On Tue, Nov 6, 20

Re: Anonymous Macros

2012-11-06 Thread jaime
May I know in what circumstances would an anonymous macro be applied? - I just don't think there's a way to define anonymous macro but maybe we can make a workaround by manipulating the macro syntax... 在 2012年11月7日星期三UTC+8上午8时17分37秒,Sean Neilan写道: > > Is there any way to write an anonymous macro

Re: Anonymous Macros

2012-11-06 Thread Sun Ning
I'm afraid not. Macro should be bound on a var. The clojure compile checks an attribute (isMacro) on a var to determine if it's a macro or function. And Since a macro has no value, you cannot write it with some literals. On Wed 07 Nov 2012 08:16:42 AM CST, Sean Neilan wrote: Is there any way t