Liking cljdoc? Tell your friends :D

clj-arsenal.action


<<clj/s

(<< kind & args)

Creates an injection with a depth of 0.

Creates an injection with a depth of 0.
sourceraw docstring

<<ctxclj/s

(<<ctx & path)

Creates a ::context injector.

(<<ctx :path :to :context :value)

These simply inject a value from the current context.

Creates a ::context injector.

```
(<<ctx :path :to :context :value)
```

These simply inject a value from the current context.
sourceraw docstring

<<errclj/s

(<<err & data)

Creates an ::error injector, which injects an error with in a way that doesn't cause failure.

Creates an ::error injector, which injects an
error with in a way that doesn't cause failure.
sourceraw docstring

actclj/s

(act & items)

Create an action. Use like (act {:as headers} & effects) or (act & effects), where each effect is a vector with an effect kind, and zero or more args.

Create an action.  Use like `(act {:as headers} & effects)` or `(act & effects)`,
where each effect is a vector with an effect kind, and zero or more args.
sourceraw docstring

action?clj/s

(action? x)

Returns true if x is an action.

Returns true if `x` is an action.
sourceraw docstring

decideclj/s

(decide & args)

Creates an ::decide injector.

(decide
  (fn [x y]
    (if (= x y)
      [:my-effecy x]
      [:my-other-effect x y]))
  (<< :inject-x)
  (<< :inject-y))

Decision injections evaluate the given pure function, with the provided (generally injected) arguments. Injecting the result.

Creates an ::decide injector.

```
(decide
  (fn [x y]
    (if (= x y)
      [:my-effecy x]
      [:my-other-effect x y]))
  (<< :inject-x)
  (<< :inject-y))
```

Decision injections evaluate the given pure
function, with the provided (generally injected)
arguments.  Injecting the result.
sourceraw docstring

dispatcherclj/s

(dispatcher interceptors & {:keys [context-builder]})

Create a dispatcher. interceptors is an ordered collection of interceptors. context-builder is an optional function that takes a minimal initial dispatch context, and returns a modified version of the same.

Create a dispatcher.  `interceptors` is an ordered collection
of interceptors.  `context-builder` is an optional function
that takes a minimal initial dispatch context, and returns
a modified version of the same.
sourceraw docstring

effectsclj/s

(effects executor injector)

Creates an interceptor for executing effects.

Creates an interceptor for executing effects.
sourceraw docstring

errorsclj/s

(errors)

Creates an interceptor to log unhandled errors with clj-arsenal.log.

Creates an interceptor to log unhandled errors with clj-arsenal.log.
sourceraw docstring

execute-pending-effectsclj/s

(execute-pending-effects executor
                         injector
                         {pending-effects :clj-arsenal.action/pending-effects
                          executed-effects :clj-arsenal.action/executed-effects
                          :as context}
                         continue)
source

flatten-effectsclj/s

(flatten-effects effects)
source

injection?clj/s

(injection? x)

Returns true if x is an injection.

Returns true if `x` is an injection.
sourceraw docstring

quoteclj/s

(quote form)

Quotes form, preventing injections from being applied.

Quotes `form`, preventing injections from being applied.
sourceraw docstring

unquoteclj/s

(unquote form)

Unquote form.

Unquote `form`.
sourceraw docstring

with-default-injectorclj/s

(with-default-injector injector)

Wraps your custom injector in one that handles built-in injections like those produced by <<ctx, with-inj, decide.

Wraps your custom injector in one that handles built-in
injections like those produced by `<<ctx`, `with-inj`,
`decide`.
sourceraw docstring

with-injclj/smacro

(with-inj bindings & body)

Syntax sugar around decide.

(with-inj [foo (<<ctx :foo)
           bar (<<ctx :bar)]
 (+ foo bar))
Syntax sugar around `decide`.

```
(with-inj [foo (<<ctx :foo)
           bar (<<ctx :bar)]
 (+ foo bar))
```
sourceraw docstring

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

× close