Liking cljdoc? Tell your friends :D

clojure.algo.generic.comparison

Generic comparison interface This library defines generic versions of = not= < > <= >= zero? as multimethods that can be defined for any type. Of the greater/less-than relations, types must minimally implement >.

Generic comparison interface
This library defines generic versions of = not= < > <= >= zero?
as multimethods that can be defined for any type. Of the
greater/less-than relations, types must minimally implement >.
raw docstring

<cljmultimethod

(< x)
(< x y)
(< x y & more)

Return true if each argument is smaller than the following ones. The minimal implementation for type ::my-type is the binary form with dispatch value [::my-type ::my-type]. A default implementation is provided in terms of >.

Return true if each argument is smaller than the following ones.
The minimal implementation for type ::my-type is the binary form
with dispatch value [::my-type ::my-type]. A default implementation
is provided in terms of >.
sourceraw docstring

<=cljmultimethod

(<= x)
(<= x y)
(<= x y & more)

Return true if each arguments is smaller than or equal to the following ones. The minimal implementation for type ::my-type is the binary form with dispatch value [::my-type ::my-type]. A default implementation is provided in terms of >.

Return true if each arguments is smaller than or equal to the following
ones. The minimal implementation for type ::my-type is the binary form
with dispatch value [::my-type ::my-type]. A default implementation
is provided in terms of >.
sourceraw docstring

=cljmultimethod

(= x)
(= x y)
(= x y & more)

Return true if all arguments are equal. The minimal implementation for type ::my-type is the binary form with dispatch value [::my-type ::my-type].

Return true if all arguments are equal. The minimal implementation for type
::my-type is the binary form with dispatch value [::my-type ::my-type].
sourceraw docstring

>cljmultimethod

(> x)
(> x y)
(> x y & more)

Return true if each argument is larger than the following ones. The minimal implementation for type ::my-type is the binary form with dispatch value [::my-type ::my-type].

Return true if each argument is larger than the following ones.
The minimal implementation for type ::my-type is the binary form
with dispatch value [::my-type ::my-type].
sourceraw docstring

>=cljmultimethod

(>= x)
(>= x y)
(>= x y & more)

Return true if each argument is larger than or equal to the following ones. The minimal implementation for type ::my-type is the binary form with dispatch value [::my-type ::my-type]. A default implementation is provided in terms of <.

Return true if each argument is larger than or equal to the following
ones. The minimal implementation for type ::my-type is the binary form
with dispatch value [::my-type ::my-type]. A default implementation
is provided in terms of <.
sourceraw docstring

maxclj

(max x)
(max x y)
(max x y & more)

Returns the greatest of its arguments. Like clojure.core/max except that is uses generic comparison functions implementable for any data type.

Returns the greatest of its arguments. Like clojure.core/max except that
is uses generic comparison functions implementable for any data type.
sourceraw docstring

minclj

(min x)
(min x y)
(min x y & more)

Returns the least of its arguments. Like clojure.core/min except that is uses generic comparison functions implementable for any data type.

Returns the least of its arguments. Like clojure.core/min except that
is uses generic comparison functions implementable for any data type.
sourceraw docstring

neg?cljmultimethod

(neg? x)

Return true of x is negative.

Return true of x is negative.
sourceraw docstring

not=clj

(not= & args)

Equivalent to (not (= ...)).

Equivalent to (not (= ...)).
sourceraw docstring

pos?cljmultimethod

(pos? x)

Return true of x is positive.

Return true of x is positive.
sourceraw docstring

zero?cljmultimethod

(zero? x)

Return true of x is zero.

Return true of x is zero.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close