In this guide, we will discuss Clojure integer? . Returns true if the number is an integer.
Syntax
Following is the syntax.
(integer? number)
Example
Following is an example of the integer test function.
(ns clojure.examples.hello (:gen-class)) ;; This program displays Hello World (defn Example [] (def x (integer? 0)) (println x) (def x (integer? 0.0)) (println x)) (Example)
Output
The above program produces the following output.
true false
Next Topic : Click Here
Pingback: Clojure - number? | Adglob Infosystem Pvt Ltd
Pingback: Clojure - Numbers | Adglob Infosystem Pvt Ltd