[email protected] a écrit :
> Looking at how the #^ macro is used in core.clj confuses me even more.
>
> For example:
>
> user=> (def #^{:arglist '([name]) :doc "Say hello."} hello (fn hello
> [name] (println (str "Hello, " name))))
> #'user/hello
> user=> (hello "ryan")
> Hello, ryan
> nil
>
> I mean I kind of follow it, but not totally.  Is this macro explained
> somewhere?
>   
#^{:arglist '([name]) :doc "Say hello."} hello indeed adds the metadata 
to the symbol but def copies the symbol metadata to make the var metadata.
http://code.google.com/p/clojure/source/browse/trunk/src/jvm/clojure/lang/Compiler.java#363

Christophe

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to