it is a macro with a syntax quote, so all symbols are namespace-qualified. so = will actually be clojure.core/=
the ~' removes this namespace-qualification, so it is rendered as just =. 2010/8/21 limux <liumengji...@gmail.com>: > This is some code in a blog of William Gropper, the useage of ~'= > confused me, waiting some more detailed explain, advanced thanks > > (defmacro filter > [pred query] > `(let [~'and (fn[& xs#] (apply str (interpose " AND " xs#))) > ~'or (fn[& xs#] (apply str (interpose " OR " xs#))) > ~'= (fn[x# y#] (sql-exp "=" x# y#)) > ~'> (fn[x# y#] (sql-exp ">" x# y#)) > ~'< (fn[x# y#] (sql-exp "<" x# y#)) > ~'like (fn[x# y#] (sql-exp "like" x# y#)) > ~'in (fn[x# xs#] > (str (sqlize x#) " IN (" (apply str (interpose ", " xs#)) ")"))] > (apply str ~query " where " ~pred))) > > -- > 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 -- Linux-user #496644 (http://counter.li.org) - first touch of linux in 2004 Demandoj en aŭ pri Esperanto? Questions about Esperanto? Vragen over Esperanto? Perguntas sobre o Esperanto? - http://demandoj.tk -- 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