You're viewing version 1.2.0 of get-possibly-unbound-var. The latest stable version of Clojure Core is 1.3.0.
1.2.0 Arrow_down_16x16

get-possibly-unbound-var

clojure.test

  • (get-possibly-unbound-var v)
Like var-get but returns nil if the var is unbound.

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/test.clj:395 top

(defn get-possibly-unbound-var
  "Like var-get but returns nil if the var is unbound."
  {:added "1.1"}
  [v]
  (try (var-get v)
       (catch IllegalStateException e
         nil)))
Vars in clojure.test/get-possibly-unbound-var: defn var-get
Used in 0 other vars

Comments top

No comments for get-possibly-unbound-var. Log in to add a comment.