Liking cljdoc? Tell your friends :D

nedap.utils.modular.api


add-methodcljmacro

(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.
sourceraw docstring

delegatecljmacro

(delegate delegator _ target & delegator-methods)

Returns 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
Returns `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
sourceraw docstring

dependentclj/s

(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.
sourceraw docstring

implementcljmacro

(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.
sourceraw docstring

metadata-extension-supported?clj/s

(metadata-extension-supported? clojure-version)
source

omit-thisclj/s

(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.
sourceraw docstring

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

× close