Functional and flexible multimethods for Clojure. Nondestructive multimethod construction, CLOS-style aux methods and method combinations, partial-default dispatch, easy next-method invocation, helpful debugging tools, and more.
Eclipse Public License 2.0
292
stars
19
forks
source link
methodical.util/prefers? uses different logic from actual logic in methodical.impl.dispatcher.common/dominates? #23
I think we should go ahead and remove the util function because prefers? actually needs to look for ancestors in the hierarchy, which is not part of the Dispatcher interface -- see #22.
With vanilla Clojure multimethods, preferences are not transitive -- see https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/MultiFn.java#L105. The actual implementation used in
methodical.impl.dispatcher.common
is not transitive, so the util function shouldn't be either.I think we should go ahead and remove the util function because
prefers?
actually needs to look for ancestors in the hierarchy, which is not part of theDispatcher
interface -- see #22.