Oh, and of course the final line of the above REPL interaction is this:
user> (meta #'x)
{:ns #<Namespace user>, :name x, :file "NO_SOURCE_FILE", :line 1,
:arglists ([])}
Thus there's a sort of an off-by-one error in that the function
created by defn gets the metadata which was attached to its Var
*before* the defn form was evaluated (which will be the metadata of a
newborn Var if the defn form is the first one to have it constructed),
whereas the Var is subsequently given the correct metadata for the
function. Ouch. :-)
Sincerely,
Michał
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
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