• (cast c x)
Throws a ClassCastException if x is not a c, else returns x.

1 Example top

  • user=> (cast Integer 1)  
    1
    
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:312 top

(defn cast
  "Throws a ClassCastException if x is not a c, else returns x."
  {:added "1.0"
   :static true}
  [^Class c x] 
  (. c (cast x)))
Vars in clojure.core/cast:
Used in 0 other vars

Comments top

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