Liking cljdoc? Tell your friends :D

clj-arsenal.basis.protocols.chain

Provides a protocol, and some default implementations, for working with potentially asynchronous chains of execution.

Provides a protocol, and some default implementations, for
working with potentially asynchronous chains of execution.
raw docstring

Chainclj/sprotocol

-chainclj/s

(-chain chainable continue)

Calls continue (eventually) with the resolved value.

Calls continue (eventually) with the resolved value.
source

chainclj/s

(chain x continue)

If x satisfies Chain, calls continue with the resolved value, once it resolves.

Returns nil.

If `x` satisfies `Chain`, calls `continue` with the
resolved value, once it resolves.

Returns `nil`.
sourceraw docstring

chain-allclj/s

(chain-all form continue & {:keys [mapper]})

Resolves all Chain implementors in form, calling continue with the result.

If an inner chainable resolves to an error? value, the result will be the first such value encountered instead of the resolved form.

If mapper is given, each inner value of x will be passed through it; allowing for substitution. If the value is a chainable, then the resolved value will be passed.

Resolves all `Chain` implementors in `form`, calling `continue`
with the result.

If an inner chainable resolves to an `error?` value, the result
will be the first such value encountered instead of the
resolved `form`.

If `mapper` is given, each inner value of `x` will be passed
through it; allowing for substitution.  If the value is a
chainable, then the resolved value will be passed.
sourceraw docstring

chainableclj/s

(chainable f)

Invokes f with a continue function. Returns something that satisfies Chain. When continue is called, the chainable will resolve to its argument.

Invokes `f` with a `continue` function.  Returns
something that satisfies `Chain`.  When `continue`
is called, the chainable will resolve to its argument.
sourceraw docstring

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

× close