Documentation string in metadata?

2 views
Skip to first unread message

Axel Schlueter

unread,
Oct 29, 2008, 12:15:45 PM10/29/08
to clo...@googlegroups.com
the metadata for the second function definition
doesn't contain the documentation string. I was
wondering if this is valid behaviour or a bug?


user> (defn foobar "foobar" [] ())
user> (:doc (meta #'foobar))
"foobar"


user> (defn foobar [] "foobar" ())
user> (:doc (meta #'foobar))
nil


Regards,
Axel

Stuart Halloway

unread,
Oct 29, 2008, 1:06:56 PM10/29/08
to clo...@googlegroups.com
Axel,

The second function definition doesn't have a documentation string, it
has a string form in its body. Valid behavior, but potentially
confusing.

Stuart

Reply all
Reply to author
Forward
0 new messages