function/macro | since v0.0-927 | clojure.core/< | Edit |
(< x)
(< x y)
(< x y & more)
Returns true if each successive number argument is greater than the previous one, false otherwise.
(< 1 2)
;;=> true
(< 2 1)
;;=> false
(< 1 1)
;;=> false
(< 2 3 4 5 6)
;;=> true
Returns non-nil if nums are in monotonically increasing order, otherwise false.
(defn ^boolean <
([x] true)
([x y] (cljs.core/< x y))
([x y & more]
(if (cljs.core/< x y)
(if (next more)
(recur y (first more) (next more))
(cljs.core/< y (first more)))
false)))
(core/defmacro ^::ana/numeric <
([x] true)
([x y] (bool-expr (core/list 'js* "(~{} < ~{})" x y)))
([x y & more] `(and (< ~x ~y) (< ~y ~@more))))