user=> (int 1) 1 user=> (int 1M) 1 user=> (int 1.2) 1 user=> (int \1) 49 user=> (int \a) 97 user=> (int "1") java.lang.ClassCastException: ...
(defn int
"Coerce to int"
{
:inline (fn [x] `(. clojure.lang.RT (~(if *unchecked-math* 'uncheckedIntCast 'intCast) ~x)))
:added "1.0"}
[x] (. clojure.lang.RT (intCast x)))
Comments top
No comments for int. Log in to add a comment.