Liking cljdoc? Tell your friends :D

humilia.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).
raw 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).
raw 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).
raw 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).
raw 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.
raw 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.
raw 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.
raw 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.
raw 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.
raw 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
raw 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
raw docstring

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

× close