You're viewing version 1.2.0 of <=. The latest stable version of Clojure Core is 1.3.0.
1.2.0 Arrow_down_16x16
  • (<= x)
  • (<= x y)
  • (<= x y & more)
Returns non-nil if nums are in monotonically non-decreasing order,
otherwise false.

1 Example top

  • user=> (<= 1 2)
    true
    user=> (<= 2 2)
    true
    user=> (<= 3 2)
    false
    user=> (<= 2 3 4 5 6)
    true
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:853 top

(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)))
Vars in clojure.core/<=: defn first next

Comments top

No comments for <=. Log in to add a comment.