Comparator

a single version constraint: a comparison operator paired with a Semver. Comparators are produced by parsing a Range; a version satisfies a comparator when the operator holds for it under SemVer precedence.

copy

instantiate

(Fn [(Ref Comparator a)] Comparator)

copies a Comparator.

delete

instantiate

(Fn [Comparator] ())

deletes a Comparator. Should usually not be called manually.

init

instantiate

(Fn [SemverOp, Semver] Comparator)

creates a Comparator.

op

instantiate

(Fn [(Ref Comparator a)] (Ref SemverOp a))

gets the op property of a Comparator.

prn

instantiate

(Fn [(Ref Comparator a)] String)

converts a Comparator to a string.

set-op

instantiate

(Fn [Comparator, SemverOp] Comparator)

sets the op property of a Comparator.

set-op!

instantiate

(Fn [(Ref Comparator a), SemverOp] ())

sets the op property of a Comparator in place.

set-ver

instantiate

(Fn [Comparator, Semver] Comparator)

sets the ver property of a Comparator.

set-ver!

instantiate

(Fn [(Ref Comparator a), Semver] ())

sets the ver property of a Comparator in place.

str

defn

(Fn [(Ref Comparator a)] String)

                        (str c)
                    

renders a comparator, e.g. >=1.2.3.

update-op

instantiate

(Fn [Comparator, (Ref (Fn [SemverOp] SemverOp a) b)] Comparator)

updates the op property of a Comparator using a function f.

update-ver

instantiate

(Fn [Comparator, (Ref (Fn [Semver] Semver a) b)] Comparator)

updates the ver property of a Comparator using a function f.

ver

instantiate

(Fn [(Ref Comparator a)] (Ref Semver a))

gets the ver property of a Comparator.