> Sorry, I should explained using code what I am looking for:

Oh yea!!!

> (defmacro find-name []
>  ;; some magic here
>  ..)
>
> (defn foo []
>  ..
>  (println (find-name)) ; should print "foo"
>  ..)
>
> I am looking for a way to write the `find-name` macro. So, you can see
> I want to use it with regular functions defined using `defn`.

you may start here
https://groups.google.com/forum/?fromgroups#!topic/clojure/RZIFCLWNKuk
and especially - take a look at the macro written by Henk Boom in that thread:

(defmacro nlet [name args & body]
    (let [arg-names (take-nth 2 args)
          arg-inits (and args (take-nth 2 (rest args)))]
      `((fn ~name [~@arg-names] ~@body) ~@arg-inits)))

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