Hendekagon
Hendekagon

Reputation: 4643

Can I get metadata for a namespace?

If I put metadata in a namespace declaration:

(ns 
^{:doc "Myspace documentation"}
myspace
)

can I get it ? I tried (meta myspace), (meta #'myspace) but I can't get it

Upvotes: 14

Views: 903

Answers (1)

Kyle
Kyle

Reputation: 22258

If you are currently in that namespace, you can do this

myspace=> (meta *ns*)
{:doc "Myspace documentation"}

If you are NOT in the namespace, you can use find-ns

foo=> (meta (find-ns 'myspace))
{:doc "Myspace documentation"}

Upvotes: 15

Related Questions