Hello clojurians. Someone, please teach me how I can refer an auto-gensymed symbol of an external syntax-quoted expression from an internal unquoted expression?
A simplified example: user=> ((fn [d] `(fn [a#] ~(if d `(drop ~d a#) `a#))) 3) (clojure.core/fn [a__*xxxx*__auto__] (clojure.core/drop 3 a__*yyyy* __auto__)) user=> ((fn [d] `(fn [a#] ~(if d `(drop ~d a#) `a#))) nil) (clojure.core/fn [a__*xxxx*__auto__] a__*yyyy*__auto__) But what I want is an expression generating (clojure.core/fn [a__*xxxx*__auto__] (clojure.core/drop 3 a__*xxxx* __auto__)) if 'd' is 3, and (clojure.core/fn [a__*xxxx*__auto__] a__*xxxx*__auto__) if 'd' is nil. I know that I can do this with (fn [d] (if d `(fn [a#] (drop ~d a#)) `(fn [a#] a#))). But this is a simplified example and I need the outermost syntax-quote for some reasons in my real situation. What I want is an expression which I can use instead of `(drop ~d a#) and `a# in the first expression in the example above. Thank you in advance. Regards, Yoshinori Kohyama -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.