You're viewing version 1.2.0 of integer?. The latest stable version of Clojure Core is 1.3.0.
1.2.0 Arrow_down_16x16

integer?

clojure.core

  • (integer? n)
Returns true if n is an integer

1 Example top

  • user=> (integer? 1)
    true
    user=> (integer? 1.0)
    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:2724 top

(defn integer?
  "Returns true if n is an integer"
  {:added "1.0"}
  [n]
  (or (instance? Integer n)
      (instance? Long n)
      (instance? BigInteger n)
      (instance? Short n)
      (instance? Byte n)))
Vars in clojure.core/integer?: defn instance? or

Comments top

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