(add-method multifn dispatch-val f)
Installs a new method of multimethod associated with dispatch-value.
Installs a new method of multimethod associated with dispatch-value.
(delegate delegator _ target & delegator-methods)
Returns this
with all methods of target
+ delegator-methods
.
note:
target
(instead of this
) when called.this
can access target
through ::targetReturns `this` with all methods of `target` + `delegator-methods`. note: - non-overwritten methods receive `target` (instead of `this`) when called. - `this` can access `target` through ::target
(dependent component & {:keys [on renames] :as opts})
A replacement for #'com.stuartsierra.component/using
,
in which renames can be summed to non-renamed dependencies.
A replacement for `#'com.stuartsierra.component/using`, in which renames can be summed to non-renamed dependencies.
(implement object & methods)
Returns a copy of object
that implements methods
via metadata (Clojure 1.10 feature).
In order to foster clear code, it is enforced that methods
are expressed as symbols (and not as inline functions).
It is verified at runtime that the symbols do resolve to protocol functions and implementation functions (respectively).
This run-time checking yields a superior solution to plain metadata-based protocol extension, where symbols may contain typos.
Check this library's README for notes on ClojureScript compatibility.
Returns a copy of `object` that implements `methods` via metadata (Clojure 1.10 feature). In order to foster clear code, it is enforced that `methods` are expressed as symbols (and not as inline functions). It is verified at runtime that the symbols do resolve to protocol functions and implementation functions (respectively). This run-time checking yields a superior solution to plain metadata-based protocol extension, where symbols may contain typos. Check this library's README for notes on ClojureScript compatibility.
(omit-this f)
Creates a replacement for f
which drops the first argument, presumed to be of "this" type.
Apt for protocol extensions, when f
is an arbitrary function which may not participate in our protocols at all.
Creates a replacement for `f` which drops the first argument, presumed to be of "this" type. Apt for protocol extensions, when `f` is an arbitrary function which may not participate in our protocols at all.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close