I'm still a little confused as to what you're trying to do,
but is this what you're looking for?

(defmacro zzz [form]
                (first form))

(defmacro eval-zzz [form]
                `(zzz ~(eval form)))

rlm.play-all> (zzz (range 1 2))
#<core$range clojure.core$ra...@61e066>

rlm.play-all> (macroexpand-1 '(eval-zzz (range 5)))
(rlm.play-all/zzz (0 1 2 3 4))

rlm.play-all> (eval-zzz (range 5))
0

--Robert

On Wed, Oct 13, 2010 at 1:55 AM, Sunil S Nandihalli
<sunil.nandiha...@gmail.com> wrote:
> Hello Everybody,
>  I think I was not clear about things in my previous email.. I am reposting
> simplifying things...
> Variables is a macro which works in the following way..
> (Variables (+ x (* 2 y))
> returns
>  [x y]
> now let us say we have a function
> (defn f []
>   '(+ x (* 2 y)))
> now I would like to do something like
> (Variables (f))
> which would return
> [x y]
> I know if is a function and will not be evaluated before the macro expands..
> may be there is a way to wrap it in a macro (since f is already defined
> which I would like to use) and have the macro Variables apply on the result
> of evaluation of f
> any help is greatly appreciated.
> Thanks,
> Sunil.
>
> --
> 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

Reply via email to