Used by the steps: where the state lives in the ctx, state paths and nodes, choosing among options, running an action.
Used by the steps: where the state lives in the ctx, state paths and nodes, choosing among options, running an action.
(first-matching-option options ctx x)The first option whose :cond holds for ctx and x (or that has no :cond).
The first option whose :cond holds for `ctx` and `x` (or that has no :cond).
(new-state old-state-path target)Where a target leads from old-state-path: a vector is absolute, a keyword
replaces the last segment. A single-segment path collapses to its keyword.
Where a target leads from `old-state-path`: a vector is absolute, a keyword replaces the last segment. A single-segment path collapses to its keyword.
(run-action opts action ctx [event params])Runs action on ctx with params (through the :action-trace-fn in opts
when there is one); no action → ctx.
Runs `action` on `ctx` with `params` (through the :action-trace-fn in `opts` when there is one); no action → `ctx`.
(state-node machine path)The machine's map for the state at path.
The machine's map for the state at `path`.
(state-path ctx opts)The current state as a path vector: :a → [:a], [:a :b] stays.
The current state as a path vector: :a → [:a], [:a :b] stays.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |