On Jan 30, 2009, at 4:49 PM, bOR_ wrote:
(def myvar ; cant do a nice " "description here, even though hash-maps can stand in for functions. (hash-map :a 1 :b 3))
clojure.contrib.def/defvar offers some help with that:
-------------------------
clojure.contrib.def/defvar
([name] [name init] [name init doc])
Macro
Defines a var with an optional intializer and doc string
For example:
(defvar myvar
(hash-map :a 1 :b 3)
"a nice description here")
This also works:
(def
#^{:doc "a nice description here"}
myvar
(hash-map :a 1 :b 3))
--Steve
smime.p7s
Description: S/MIME cryptographic signature
