Re: Creating a var, functions from a macro

2011-11-19 Thread Stephen Compall
On Wed, 2011-11-09 at 13:50 -0800, Sean Bowman wrote: > Apparently the missing bit is I need to "escape" the symbol calls, > e.g. > > (defn ~(symbol "index") ... > > Is this correct? Better yet, ~'index. There's a good example of this pattern in defmacro fn in clojure/core.clj. -- Stephe

Re: Creating a var, functions from a macro

2011-11-09 Thread Sean Bowman
Apparently the missing bit is I need to "escape" the symbol calls, e.g. (defn ~(symbol "index") ... Is this correct? -- 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 fr

Creating a var, functions from a macro

2011-11-09 Thread Sean Bowman
I've got a few namespaces that use similar functions, but with slight variations. I was thinking of using a macro to generate the repetitive bits of this code, but I'm just not able to get past Cons exceptions and missing symbols. Here's a simple version of what I'm trying to do. Right now, I ha