class

clojure.core

  • (class x)
Returns the Class of x

1 Example top

  • user=> (class 1)
    java.lang.Integer
    
    user=> (class [1 2 3])
    clojure.lang.PersistentVector
    
    user=> (class (String. "foo"))
    java.lang.String
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:3046 top

(defn class
  "Returns the Class of x"
  {:added "1.0"
   :static true}
  ^Class [^Object x] (if (nil? x) x (. x (getClass))))
Vars in clojure.core/class:
Used in 0 other vars

Comments top

No comments for class. Log in to add a comment.