• (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:1189 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?:
Used in 0 other vars

Comments top

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