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 & {:keys [mapper]})

Walks the form x, waiting for anything that satisfies Chain to resolve.

Returns a chainable, which resolves to x with all its inner chainables resolved.

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

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.

Walks the form `x`, waiting for anything that satisfies `Chain`
to resolve.

Returns a chainable, which resolves to `x` with all its inner
chainables resolved.

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

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