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:400 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:
Used in 0 other vars

Comments top

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