The argument isn't being evaluated during macro expansion, it's being evaluated when the expanded form is evaluated by the repl:
user=> (macroexpand '(infix (5 + 4))) (let* [vec__590 (5 + 4) x__574__auto__ (clojure.core/nth vec__590 0 nil) f__575__auto__ (clojure.core/nth vec__590 1 nil) y__576__auto__ (clojure.core/nth vec__590 2 nil)] (f__575__auto__ x__574__auto__ y__576__auto__)) user=> (let* [vec__590 (5 + 4) x__574__auto__ (clojure.core/nth vec__590 0 nil) f__575__auto__ (clojure.core/nth vec__590 1 nil) y__576__auto__ (clojure.core/nth vec__590 2 nil)] (f__575__auto__ x__574__auto__ y__576__auto__)) java.lang.ClassCastException: java.lang.Integer cannot be cast to clojure.lang.IFn (NO_SOURCE_FILE:0) Make sense? Dave On Mon, Sep 26, 2011 at 10:26 AM, ru <soro...@oogis.ru> wrote: > Timothy! > > Thank you for the explanation. I understand quite well about > performance. I do'nt understand why it evaluates argument (5 + 4) > during expansion in my case? > > Ru > > -- > 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