Liking cljdoc? Tell your friends :D

utiliva.comparator


<clj

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

Exactly like clojure.core/<, but requires an explicit comparator (of the -1/0/1 variety).

Exactly like clojure.core/<, but requires an explicit comparator (of the -1/0/1 variety).
sourceraw docstring

<=clj

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

Exactly like clojure.core/<=, but requires an explicit comparator (of the -1/0/1 variety).

Exactly like clojure.core/<=, but requires an explicit comparator (of the -1/0/1 variety).
sourceraw docstring

>clj

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

Exactly like clojure.core/>, but requires an explicit comparator (of the -1/0/1 variety).

Exactly like clojure.core/>, but requires an explicit comparator (of the -1/0/1 variety).
sourceraw docstring

>=clj

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

Exactly like clojure.core/>=, but requires an explicit comparator (of the -1/0/1 variety).

Exactly like clojure.core/>=, but requires an explicit comparator (of the -1/0/1 variety).
sourceraw docstring

compare-compcljmacro

(compare-comp & fns)

Composes the comparators. Inlines everything. There's a better implementation somewhere.

Composes the comparators. Inlines everything. There's a better implementation somewhere.
sourceraw docstring

maxclj

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

Exactly like clojure.core/max, but requires an explicit comparator of the -1/0/1 variety.

Exactly like clojure.core/max, but requires an explicit comparator of the -1/0/1 variety.
sourceraw docstring

max-byclj

(max-by cmp f x)
(max-by cmp f x y)
(max-by cmp f x y & more)

Exactly like clojure.core/max-key, but requires an explicit comparator fof the -1/0/1 variety.

Exactly like clojure.core/max-key, but requires an explicit comparator fof the -1/0/1 variety.
sourceraw docstring

minclj

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

Exactly like clojure.core/min, but requires an explicit comparator of the -1/0/1 variety.

Exactly like clojure.core/min, but requires an explicit comparator of the -1/0/1 variety.
sourceraw docstring

min-byclj

(min-by cmp f x)
(min-by cmp f x y)
(min-by cmp f x y & more)

Exactly like clojure.core/min-key, but requires an explicit comparator of the -1/0/1 variety.

Exactly like clojure.core/min-key, but requires an explicit comparator of the -1/0/1 variety.
sourceraw docstring

proj-comparatorcljmacro

(proj-comparator & projs-and-cmps)

Builds a discriminating comparator for two arbitrary objects given an alternating sequence of projection functions and comparators for said projections eg: > ((proj-comparator :a compare :b compare) {:a 1 :b 2} {:a 1 :b 1}) => 1

Builds a discriminating comparator for two arbitrary objects given
an alternating sequence of projection functions and comparators
for said projections
eg: > ((proj-comparator :a compare :b compare) {:a 1 :b 2} {:a 1 :b 1})
    => 1
sourceraw docstring

seq-comparatorcljmacro

(seq-comparator & fs)

Builds a discriminating comparator for two vectors given a sequence of element-wise first-to-last comparators. eg: > ((seq-comparator compare compare) [1 2] [1 1]) => 1

Builds a discriminating comparator for two vectors given a sequence of
element-wise first-to-last comparators.
eg: >  ((seq-comparator compare compare) [1 2] [1 1])
    => 1
sourceraw docstring

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

× close