On Mar 29, 5:50 pm, Cedric Greevey <cgree...@gmail.com> wrote:
> On Wed, Mar 28, 2012 at 11:48 PM, Shantanu Kumar
>
> <kumar.shant...@gmail.com> wrote:
> >> If you control the third line of:
>
> >> (defn foo [x y]
> >>   (let [z (bar y (next x))]
> >>     (println "Done in " (find-name) ".")
> >>     (* 4 z (count x))))
>
> >> then don't you control the first?
>
> > Cedric – Unfortunately, no. The target is pre-written code that may
> > have been created using (1) clojure.core/defn or (2) several `defxyz`
> > kind of macros already. Injecting a macro that internally uses `find-
> > name` is something I can do, hence this need.
>
> If you can replace some other macro that code's source uses, surely
> you can also replace defn? You'd need to inject the clojure.core/defn
> wrapper into the other function's namespace, but you'd have to do that
> with the other macro anyway.

Cedric – I meant "inject" as in into the body, not to alter/wrap the
macro itself that defines the function. So, effectively I alter/wrap
neither of `defn` and `defxyz` macros.

Sun – I see your point but the functions are pre-written and quite
interwoven. I cannot change the way functions are invoked.

Shantanu

-- 
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

Reply via email to