Hi icemaze, Please look at how fns are generated in http.async.client http://github.com/neotyk/http.async.client/blob/master/src/http/async/client/util.clj#L54 this macro is later used here: http://github.com/neotyk/http.async.client/blob/master/src/http/async/client.clj#L43
HTH, Hubert. On Sep 10, 2010, at 9:39 PM, icemaze wrote: > Hi, I'm developing a small DSL with Clojure and I need to define many > similar functions. I'd like to do that programmatically, of course. > > My solution (involving a simple macro) doesn't work, so I won't bother > you with it. I'll post it if anyone asks. > > Basically what I need is: given a list of keywords, for each keyword x > i need to define a function whose name is (str "prefix-" (name x)). > The function has a very short body which uses x in one place > (something like (fn [n] (= n x))). > > Can you help me please? I've been banging my head against this for > over four hours and I'm getting a little frustrated. > > Thanks. > > -- > 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 unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en -- 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 unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en