When two multimethods have the same dispatch value, what is the method of resolution?
In order to answer this questions, I experimented by creating four files (core.cljs, a.clj, b.clj, interface.clj [where `defmulti` is defined]), implemented some methods in a and b namespace with the same dispatch value.
Finally in core
namespace, I required a
and b
, and observed the resolution was given by the order of the import of the namespace.
However, in a bigger project, the order did not have an impact: I was overriding a multimethod in a library, and I suspect the resolution was made with respect to the folder in the classpath.
Can anyone confirm or infirm my hypothesis?
Best regards,
David