Liking cljdoc? Tell your friends :D

detritus.multi

Tools for working with multimethods.

Tools for working with multimethods.
raw docstring

derive!clj

(derive! h child parent)

Although hierarchies are mostly used by indirection as vars (defmulti supports the :hierarchy argument for using hierarchies other than the default global one), and although (derive child parent) implicitly side-effects the global hierarchy, (derive h child parent) is a pure function of a hierarchy as a map structure which doesn't behave nicely when given a var.

Wrap it up with an alter-var-root so it makes sense.

Although hierarchies are mostly used by indirection as vars (`defmulti` supports the `:hierarchy`
argument for using hierarchies other than the default global one), and although `(derive child
parent)` implicitly side-effects the global hierarchy, `(derive h child parent)` is a pure
function of a hierarchy as a map structure which doesn't behave nicely when given a var.

Wrap it up with an alter-var-root so it makes sense.
sourceraw docstring

make-prefix-dispatchclj

Make a function which dispatches on the #'type tuple of the first N arguments, silently absorbing the rest.

Make a function which dispatches on the `#'type` tuple of the first N arguments, silently absorbing
the rest.
sourceraw docstring

typeclj

(type x)

Dispatch function for switching on, in order

  • The declared :type of an object
  • The :type metadata
  • The Java type

The logical extension of Clojure's #'type operator to the :type pattern.

Dispatch function for switching on, in order
 - The declared `:type` of an object
 - The `:type` metadata
 - The Java type

The logical extension of Clojure's `#'type` operator to the `:type` pattern.
sourceraw docstring

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

× close