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:3152 top

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

Comments top

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