Liking cljdoc? Tell your friends :D

methodical.impl.dispatcher.common

Utility functions for implementing Dispatchers.

Utility functions for implementing Dispatchers.
raw docstring

add-preferenceclj

(add-preference isa?* prefs x y)

Add a method preference to prefs for dispatch value x over y. Used to implement prefer-method.

Add a method preference to `prefs` for dispatch value `x` over `y`. Used to implement `prefer-method`.
sourceraw docstring

ambiguous?clj

(ambiguous? hierarchy prefs 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.
sourceraw docstring

dominates?clj

(dominates? hierarchy prefs 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`.
sourceraw docstring

domination-comparitorclj

(domination-comparitor hierarchy prefs dispatch-value)

Given a hierarchy prefs return a function that can be used to sort dispatch values from most-specific to least-specific.

Given a `hierarchy prefs` return a function that can be used to sort dispatch values from most-specific to
least-specific.
sourceraw docstring

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

× close