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

1 Example top

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

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

Comments top

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