future?

clojure.core

  • (future? x)
Returns true if x is a future

1 Example top

  • user=> (def f (future (inc 0)))
    #'user/f
    
    user=> (future? f)
    true
    
    user=> (future? 1)
    false
    
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:5738 top

(defn future?
  "Returns true if x is a future"
  {:added "1.1"
   :static true}
  [x] (instance? java.util.concurrent.Future x))
Vars in clojure.core/future?:
Used in 0 other vars

Comments top

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