Liking cljdoc? Tell your friends :D

taia.state-machines.step

One transition (a microstep), pure: from the current state, the handler for the event, its action, its target. Whether the state it entered has an invoke to run is transition's business.

One transition (a microstep), pure: from the current state, the handler for
the event, its action, its target. Whether the state it entered has an invoke
to run is `transition`'s business.
raw docstring

assoc-action-resultclj

(assoc-action-result {:keys [opts handler bare-ctx event] :as step})

Adds :new-ctx: the handler's action applied to :bare-ctx (no action → as is).

Adds :new-ctx: the handler's action applied to :bare-ctx (no action → as is).
sourceraw docstring

assoc-current-stateclj

(assoc-current-state {:keys [ctx opts] :as step})

Adds :path (the current state as a path) and :bare-ctx (the ctx actions and conds see: without the state key and :invoke).

Adds :path (the current state as a path) and :bare-ctx (the ctx actions and
conds see: without the state key and :invoke).
sourceraw docstring

assoc-handlerclj

(assoc-handler {[event-name] :event :as step})

Adds :handler — for an invoke's :on-done / :on-error from the current state's :invoke, for any other event from the machine's / state's :on.

Adds :handler — for an invoke's :on-done / :on-error from the current state's
:invoke, for any other event from the machine's / state's :on.
sourceraw docstring

invoke-eventsclj

The events an invoke raises; reserved: they are answered from the current state's :invoke, never from an :on.

The events an invoke raises; reserved: they are answered from the current
state's :invoke, never from an :on.
sourceraw docstring

move-to-targetclj

(move-to-target {:keys [ctx opts path handler new-ctx] :as step})

Sets :ctx to where the handler leads and :entered to the state moved into — nil when the handler has no target (it stays) or there is no handler (the ctx is left as it was).

Sets :ctx to where the handler leads and :entered to the state moved into —
nil when the handler has no target (it stays) or there is no handler (the ctx
is left as it was).
sourceraw docstring

stepclj

(step step-map)

One transition: {:machine :ctx :event [name params] :opts} → {:ctx new-ctx :entered state-or-nil}. Pure: no :src runs here.

One transition: {:machine :ctx :event [name params] :opts} →
{:ctx new-ctx :entered state-or-nil}. Pure: no :src runs here.
sourceraw docstring

warnclj

(warn text)
source

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close