zero?

clojure.core

  • (zero? x)
Returns true if num is zero, else false

1 Example top

  • user=> (zero? 0)
    true
    user=> (zero? 0.0)
    true
    user=> (zero? 1)
    false
    user=> (zero? 0x0)
    true
    user=> (zero? 3.14159265358M)
    false
    user=> (zero? (/ 1 2))
    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:802 top

(defn zero?
  "Returns true if num is zero, else false"
  {
   :inline (fn [x] `(. clojure.lang.Numbers (isZero ~x)))
   :added "1.0"}
  [x] (. clojure.lang.Numbers (isZero x)))
Vars in clojure.core/zero?:
Used in 0 other vars

Comments top

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