A single-hierarchy dispatcher similar to the standard dispatcher, with one big improvement: when dispatching on
multiple values, it supports default methods that specialize on some args and use the default for others. (e.g.
[String :default]
A single-hierarchy dispatcher similar to the standard dispatcher, with one big improvement: when dispatching on multiple values, it supports default methods that specialize on some args and use the default for others. (e.g. `[String :default]`
(matching-aux-methods {:keys [method-table] :as opts})Impl of Dispatcher matching-aux-methods for the multi-default dispatcher.
Impl of `Dispatcher` `matching-aux-methods` for the multi-default dispatcher.
(matching-partially-specialized-default-primary-method-pairs
opts
standard-dispatch-vals)Return pairs of [dispatch-value method] for all matching partially-specialized default methods, sorted from
most-specific to least-specific
Return pairs of `[dispatch-value method]` for all matching partially-specialized default methods, sorted from most-specific to least-specific
(matching-primary-methods
{:keys [default-value method-table unambiguous-pairs-seq-fn]
:or {unambiguous-pairs-seq-fn dispatcher.standard/unambiguous-pairs-seq}
:as opts})Return a lazy sequence of applicable priamry methods for dispatch-value, sorted from most-specific to
least-specific. Similar to the implementation in methodical.impl.dispatcher.standard, but supports
partially-specialized default methods; see explaination in ns docstring.
Return a lazy sequence of applicable priamry methods for `dispatch-value`, sorted from most-specific to least-specific. Similar to the implementation in `methodical.impl.dispatcher.standard`, but supports partially-specialized default methods; see explaination in ns docstring.
(partially-specialized-default-dispatch-values dispatch-value default-value)Return a sequence of all partially-specialized default dispatch values for a given dispatch-value and
default-value, in order from most-specific to least-specific.
(default-dispatch-values [:x :y] :default) -> ([:x :default] ; if no method for [:x :y] exists, look for [:x :default]... [:default :y] ; or [:default :y] ... [:default :default])
Return a sequence of all partially-specialized default dispatch values for a given `dispatch-value` and `default-value`, in order from most-specific to least-specific. (default-dispatch-values [:x :y] :default) -> ([:x :default] ; if no method for [:x :y] exists, look for [:x :default]... [:default :y] ; or [:default :y] ... [:default :default])
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |