• (defvar name)
  • (defvar name init)
  • (defvar name init doc)
Defines a var with an optional intializer and doc string

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/contrib/def.clj:23 top

(defmacro defvar
  "Defines a var with an optional intializer and doc string"
  ([name]
     (list `def name))
  ([name init]
     (list `def name init))
  ([name init doc]
     (list `def (with-meta name (assoc (meta name) :doc doc)) init)))
Vars in clojure.contrib.def/defvar: assoc defmacro doc list meta name with-meta
Used in 0 other vars

Comments top

1 comment(s) for defvar.

In 1.3 instead of defvar use (def name doc init)

Log in to add a comment.