Hi, Am 10.01.2011 um 01:10 schrieb Tim Robinson:
> You must have something messed up: > > In line 1 (meta ^:k []) does not return {:tag :k} it returns nil and > I am using Clojure 1.2. > > Both lines 1 and 2, shouldn't return meta, because 'meta' only takes > an object as an input argument. > And only if the object already has metadata will metadata will return. > > => (def o (with-meta ['mydatastructure] {:k []})) > => (meta o) > {:k []} Are you sure? Clojure 1.2.0 user=> (meta '^:k o) {:tag :k} user=> (meta ^:k []) {:tag :k} user=> (meta (with-meta 'o {:tag :k})) {:tag :k} user=> (meta ^:k 'o) nil The ^ stuff all works in the reader. So meta always sees only one argument with metadata already attached. The question is: Where is the meta data attached? Sincerely Meikel -- 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