A single-hierarchy dispatcher that behaves similarly to the way multimethod dispatch is done by vanilla Clojure multimethods, but with added support for auxiliary methods.
A single-hierarchy dispatcher that behaves similarly to the way multimethod dispatch is done by vanilla Clojure multimethods, but with added support for auxiliary methods.
(ambiguous? dispatcher dispatch-value dispatch-val-x dispatch-val-y)
True if neither dispatch-val-x
nor dispatch-val-y
dominate one another, e.g. because they are the same value or
are both equally-specific ancestors.
True if neither `dispatch-val-x` nor `dispatch-val-y` dominate one another, e.g. because they are the same value or are both equally-specific ancestors.
(dominates? dispatcher x y)
True if dispatch-val-x
should be considered more specific for purposes of method combination over dispatch-val-y
,
e.g. because x
derives from y
or because x
has been preferred over y
.
True if `dispatch-val-x` should be considered more specific for purposes of method combination over `dispatch-val-y`, e.g. because `x` derives from `y` or because `x` has been preferred over `y`.
(domination-comparitor dispatcher dispatch-value)
Given a dispatcher
return a function that can be used to sort dispatch values from most-specific to
least-specific.
Given a `dispatcher` return a function that can be used to sort dispatch values from most-specific to least-specific.
(isa? dispatcher child-dispatch-val parent-dispatch-val)
True if child-dispatch-val
is equal to or dervies from parent-dispatch-val
.
True if `child-dispatch-val` is equal to or dervies from `parent-dispatch-val`.
(matching-aux-methods dispatcher method-table dispatch-value)
Return a map of aux method qualifier -> sequence of applicable methods for dispatch-value
, sorted from
most-specific to least-specific.
Return a map of aux method qualifier -> sequence of applicable methods for `dispatch-value`, sorted from most-specific to least-specific.
(matching-primary-methods dispatcher method-table dispatch-value)
Return a lazy sequence of applicable primary methods for dispatch-value
, sorted from most-specific to
least-specific. Replaces methods whose dispatch value is ambiguously specific with the next matching method with
ones that throw Exceptions when invoked.
Return a lazy sequence of applicable primary methods for `dispatch-value`, sorted from most-specific to least-specific. Replaces methods whose dispatch value is ambiguously specific with the next matching method with ones that throw Exceptions when invoked.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close