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

number?

clojure.core

  • (number? x)
Returns true if x is a Number

1 Example top

  • user=> (number? 1)
    true
    user=> (number? 1.0)
    true
    user=> (number? :a)
    false
    user=> (number? nil)
    false
    user=> (number? "23")
    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:2718 top

(defn number?
  "Returns true if x is a Number"
  {:added "1.0"}
  [x]
  (instance? Number x))
Vars in clojure.core/number?: defn instance?

Comments top

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