Re: expand a form

2013-11-28 Thread Andy Smith
thanks for your helpful suggestions. -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubsc

Re: expand a form

2013-11-25 Thread Alex Miller
You might find tools.trace useful for examining a form as it is executed. https://github.com/clojure/tools.trace On Monday, November 25, 2013 6:55:27 AM UTC-6, Andy Smith wrote: > > Hi, > > I am new to clojure and I was wondering if there is a macro I can use to > fully expand all symbols and

Re: expand a form

2013-11-25 Thread Gary Verhaegen
Not sure it covers what you're asking for, but if you want to manually step through your function calls, you can use syntax-quote, provided that you have access to the spurce code of the functions you want to step through. Or you can try the debuggers in Clojure-enabled IDEs like Eclipse and Intel

Re: expand a form

2013-11-25 Thread John D. Hume
You won't find the results as easy to read as what you're asking for, but clojure.tools.analyzer will show you calls that have been inlined by the compiler. On Nov 25, 2013 2:24 PM, "Andy Smith" wrote: > In your example a full expansion might be : (. clojure.lang.Numbers (add > 10 1)) > > > On Mo

Re: expand a form

2013-11-25 Thread Andy Smith
In your example a full expansion might be : (. clojure.lang.Numbers (add 10 1)) On Monday, 25 November 2013 17:16:42 UTC, Guru Devanla wrote: > > Hi Andy, > > Not sure what you need in terms of function calls being expanded. Can you > provide an example. > > Here is an silly example, even thoug

Re: expand a form

2013-11-25 Thread Guru Devanla
Hi Andy, Not sure what you need in terms of function calls being expanded. Can you provide an example. Here is an silly example, even though this kind of macro is not needed: (def addone [v] (+ v 1) (defmacro testmacro [init] (list 'addone init)) (macroexpand '(testmacro 10)) expands t

Re: expand a form

2013-11-25 Thread Andy Smith
It doesnt seem to expand function calls though right? On Monday, 25 November 2013 12:55:27 UTC, Andy Smith wrote: > > Hi, > > I am new to clojure and I was wondering if there is a macro I can use to > fully expand all symbols and macros in a form, without performing the final > evaluation of the

Re: expand a form

2013-11-25 Thread Guru Devanla
Hi Andy, Doesn't macroexpand do what you are looking for? Thx On Mon, Nov 25, 2013 at 4:55 AM, Andy Smith wrote: > Hi, > > I am new to clojure and I was wondering if there is a macro I can use to > fully expand all symbols and macros in a form, without performing the final > evaluation of the