Arities ================================================== [x] [x y] [x y & more] Docstring ================================================== Returns non-nil if nums are in monotonically non-decreasing order, otherwise false.
Arities ================================================== [x] [x y] [x y & more] Docstring ================================================== Returns non-nil if nums are in monotonically non-decreasing order, otherwise false.
(defn <=
"Returns non-nil if nums are in monotonically non-decreasing order,
otherwise false."
{:inline (fn [x y] `(. clojure.lang.Numbers (lte ~x ~y)))
:inline-arities #{2}
:added "1.0"}
([x] true)
([x y] (. clojure.lang.Numbers (lte x y)))
([x y & more]
(if (<= x y)
(if (next more)
(recur y (first more) (next more))
(<= y (first more)))
false)))
(<= 1 2)
;; => true
(<= 2 2)
;; => true
(<= 3 2)
;; => false
(<= 2 3 4 5 6)
;; => true