Liking cljdoc? Tell your friends :D

methodical.impl.dispatcher.standard

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

matching-aux-methodsclj

(matching-aux-methods {:keys [method-table] :as opts})

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.
sourceraw docstring

matching-aux-pairsclj

(matching-aux-pairs qualifier
                    {:keys [default-value method-table dispatch-value]
                     :as opts})

Return pairs of [dispatch-value method] of applicable aux methods, including default aux methods. Pairs are ordered from most-specific to least-specific.

Return pairs of `[dispatch-value method]` of applicable aux methods, *including* default aux methods. Pairs are
ordered from most-specific to least-specific.
sourceraw docstring

matching-primary-methodsclj

(matching-primary-methods {:keys [hierarchy prefs default-value 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.
sourceraw docstring

matching-primary-pairs-excluding-defaultclj

(matching-primary-pairs-excluding-default {:keys [hierarchy prefs method-map
                                                  dispatch-value]})

Return a sequence of pairs of [dispatch-value method] for all applicable dispatch values, excluding the default method (if any); pairs are sorted in order from most-specific to least-specific.

Return a sequence of pairs of `[dispatch-value method]` for all applicable dispatch values, excluding the default
method (if any); pairs are sorted in order from most-specific to least-specific.
sourceraw docstring

unambiguous-pairs-seqclj

(unambiguous-pairs-seq {:keys [hierarchy prefs dispatch-value ambiguous-fn]
                        :or {ambiguous-fn dispatcher.common/ambiguous?}
                        :as opts}
                       [[this-dispatch-val this-method :as _this-pair]
                        [next-dispatch-val next-method :as next-pair] &
                        more-pairs :as pairs])

Given a sequence of [dispatch-value primary-method] pairs, return a sequence that replaces the method in each pair with one that will throw an Exception if the dispatch value in the following pair is equally specific.

Given a sequence of `[dispatch-value primary-method]` pairs, return a sequence that replaces the method in each pair
with one that will throw an Exception if the dispatch value in the *following* pair is equally specific.
sourceraw docstring

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

× close