1.3.0 permalink Arrow_down_16x16

bound?

clojure.core

  • (bound? & vars)
Returns true if all of the vars provided as arguments have any bound value, root or thread-local.
Implies that deref'ing the provided vars will succeed. Returns true if no vars are provided.

1 Example top

  • user=> (def foobar)
    #'user/foobar
    user=> (bound? #'foobar)
    false
    user=> (def boing 10)
    #'user/boing
    user=> (bound? #'boing)
    true
    user=> (defn plus3 [n] (+ 3 n))
    #'user/plus3
    user=> (bound? #'plus3)
    true
    
Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/core.clj:4814 top

(defn bound?
  "Returns true if all of the vars provided as arguments have any bound value, root or thread-local.
   Implies that deref'ing the provided vars will succeed. Returns true if no vars are provided."
  {:added "1.2"
   :static true}
  [& vars]
  (every? #(.isBound ^clojure.lang.Var %) vars))
Vars in clojure.core/bound?:
Used in 0 other vars

Comments top

No comments for bound?. Log in to add a comment.