Liking cljdoc? Tell your friends :D

multicall.core


defcallcljmacro

(defcall multifn name? dispatch-val & fn-tail)

Like defmethod, but can register multiple calls with the same dispatch value. However, a call WILL override a previously registered call if all of the below are true:

  • the call names (the name? argument) are the same or both omitted;
  • the dispatch values are the same;
  • both calls are registered from the same namespace.

The dispatch-val doesn't have to be a keyword but it can have a form of :your-ns/* which will catch all calls for :your-ns-namespaced keywords.

Like defmethod, but can register multiple calls with the same dispatch value.
However, a call WILL override a previously registered call if all of the below
are true:

  - the call names (the name? argument) are the same or both omitted;
  - the dispatch values are the same;
  - both calls are registered from the same namespace.

The dispatch-val doesn't have to be a keyword but it can have a form of
:your-ns/* which will catch all calls for :your-ns-namespaced keywords.
sourceraw docstring

defcall*clj

(defcall* multifn-var name dispatch-val f)
source

defmulticallcljmacro

(defmulticall name dispatch-fn)

Like defmulti, but created multicall can have multiple calls with the same dispatch value registered.

Like defmulti, but created multicall can have multiple calls with the same
dispatch value registered.
sourceraw docstring

multicall*clj

(multicall* ns name dispatch-fn & args)
source

registryclj

source

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

× close