# API for generic.comparison
- ()

by Konrad Hinsen

### clojure-contrib is now deprecated

clojure-contrib is no longer being developed or maintained.

Rather than a single, monolithic, contributions library, Clojure now has
a set of separate libraries for each unit of functionality. The libraries
are in the Clojure GitHub organization at
https://github.com/clojure.
API documentation of the libraries can be found at
https://clojure.github.io.

If you're looking for a specific function or namespace from the old
clojure-contrib, see
"Where Did Clojure.Contrib Go".

Full namespace name:

clojure.contrib.generic.comparison
## Overview

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

## Public Variables and Functions

## <

multimethod
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (< 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 >.

Source

## <=

multimethod
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (<= 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 >.

Source

## =

multimethod
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (= 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].

Source

## >

multimethod
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (> 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].

Source

## >=

multimethod
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (>= 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 <.

Source

## max

function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (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.

Source

## min

function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (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.

Source

## neg?

multimethod
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (neg? x)

Return true of x is negative.

Source

## pos?

multimethod
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (pos? x)

Return true of x is positive.

Source

## zero?

multimethod
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (zero? x)

Return true of x is zero.

Source