Liking cljdoc? Tell your friends :D
Clojure only.

fogus.mm

Utilities for working with multimethods.

Utilities for working with multimethods.
raw docstring

defmethod-explicitcljmacro

(defmethod-explicit multifn dispatch-val & fn-tail)

In a standard defmethod body you have no direct reference to the dispatch value itself. Instead, you'd have to hardcode it as a literal or look it up from somewhere else.

This macro allows you to opt into naming the dispatch value to a name via :as DV:

(defmethod-explicit my-multi :bar :as the-dv [x] (str the-dv :-> x))

Shadowing DV in the arglist will nullify the utility of the named dispatch value.

In a standard defmethod body you have no direct reference to the dispatch value itself.
Instead, you'd have to hardcode it as a literal or look it up from somewhere else.

This macro allows you to opt into naming the dispatch value to a name via ``:as DV``:

    (defmethod-explicit my-multi :bar :as the-dv [x] (str the-dv :-> x))

Shadowing ``DV`` in the arglist will nullify the utility of the named dispatch value.
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close