integer?

added
1.0

ns
clojure.core

type
function

(integer? n)

Returns true if n is an integer

                user=> (integer? 1)
true
user=> (integer? 1.0)
false
            
                ;; Note: tests if it's a math integer, not a Java Integer
user=> (integer? (inc Integer/MAX_VALUE))
true
            
                ;; integer? returns true for BigInts. If you don't want this behavior, you can 
;; use the int? predicate instead in Clojure 1.9 or later:

(integer? 13N)
;; => true

(int? 13N)
;; => false