Returns non-nil if nums are in monotonically decreasing order,
otherwise false.
user=> (> 1 2)
false
user=> (> 2 1)
true
user=> (> 2 2)
false
user=> (> 6 5 4 3 2)
true
user=> (sort > (vals {:foo 5, :bar 2, :baz 10}))
(10 5 2)
(defn >
"Returns non-nil if nums are in monotonically decreasing order,
otherwise false."
{:inline (fn [x y] `(. clojure.lang.Numbers (gt ~x ~y)))
:inline-arities #{2}
:added "1.0"}
([x] true)
([x y] (. clojure.lang.Numbers (gt x y)))
([x y & more]
(if (> x y)
(if (next more)
(recur y (first more) (next more))
(> y (first more)))
false)))
Comments top
No comments for >. Log in to add a comment.