Hi,

On Feb 17, 12:49 pm, Terrence Brannon <scheme...@gmail.com> wrote:

> On Wed, Feb 17, 2010 at 5:51 AM, Meikel Brandmeyer <m...@kotka.de> wrote:
>
> > #^ attaches metadata to the following thing read.
>
> The reference manual REPL transcript <http://clojure.org/special_forms>
> makes it look like it is being used to retrieve the metadata:
>
> user=> ^#'mymax
> ->{:name mymax,
>    :user/comment "this is the best fn ever!",
>    :doc "mymax [xs+] gets the maximum value in xs using > ",
>    :arglists ([x] [x y] [x y & more])
>    :file "repl-1",
>    :line 126,
>    :ns #<Namespace user >,
>
> :test #<user$fn__289 user$fn__...@20f443 >}
>
> Also, I'm not clear on why I cant get the metadata for this variable x I
> just defined even though meta() takes an object as argument 
> <http://clojure.org/metadata>
>
> user=> (def #^{ :doc "some doc" } x 12)
> #'user/x
> user=> (meta x)
> nil
> user=> x
> 12
> user=>

You confuse #^ with #'.

Try (meta #'x).

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

Reply via email to