You're viewing version 1.2.0 of neg?. The latest stable version of Clojure Core is 1.3.0.
1.2.0 Arrow_down_16x16
  • (neg? x)
Returns true if num is less than zero, else false

1 Example top

  • user=> (neg? -1)
    true
    user=> (neg? 0)
    false
    user=> (neg? 1)
    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:997 top

(defn neg?
  "Returns true if num is less than zero, else false"
  {
   :inline (fn [x] `(. clojure.lang.Numbers (isNeg ~x)))
   :added "1.0"}
  [x] (. clojure.lang.Numbers (isNeg x)))
Vars in clojure.core/neg?: defn

Comments top

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