You are right, i noticed "it calls withMeta", but in the expression, actually use with-meta to define with-meta, it's very strange, thank you very much! (def with-meta (fn ^:static with-meta [^clojure.lang.IObj x m] (. x (withMeta m))))
On Saturday, September 21, 2013 3:30:30 PM UTC+8, Michał Marczyk wrote: > > Actually with-meta's definition does not refer to with-meta. Rather, > it calls withMeta, a method in the clojure.lang.IObj interface which > the first argument to with-meta is supposed to implement. > > Cheers, > Michał > > > On 21 September 2013 09:01, <ljcp...@gmail.com <javascript:>> wrote: > > Hi, > > I read the source about with-meta, and find def with-meta using > with-meta, > > can it? someone give a explain? > > > > user=> (source with-meta) > > (def > > ^{:arglists '([^clojure.lang.IObj obj m]) > > :doc "Returns an object of the same type and value as obj, with > > map m as its metadata." > > :added "1.0" > > :static true} > > with-meta (fn ^:static with-meta [^clojure.lang.IObj x m] > > (. x (withMeta m)))) > > > > -- > > -- > > You received this message because you are subscribed to the Google > > Groups "Clojure" group. > > To post to this group, send email to clo...@googlegroups.com<javascript:> > > Note that posts from new members are moderated - please be patient with > your > > first post. > > To unsubscribe from this group, send email to > > clojure+u...@googlegroups.com <javascript:> > > 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+u...@googlegroups.com <javascript:>. > > For more options, visit https://groups.google.com/groups/opt_out. > -- -- 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.