Shared compile-time helpers for machine-latch validation and compilation.
Shared compile-time helpers for machine-latch validation and compilation.
(compile-transition-fn transitions state->idx)Compile transitions map to a nested case function. Input: {action-kw {from-idx to-idx, ...}, ...} Output: (fn [action from-idx] (case action ...))
Compile transitions map to a nested case function.
Input: {action-kw {from-idx to-idx, ...}, ...}
Output: (fn [action from-idx] (case action ...))(terminal-states transitions)Returns states that appear as destinations but never as sources. A valid machine has exactly one terminal state.
Returns states that appear as destinations but never as sources. A valid machine has exactly one terminal state.
(validate-machine! {:keys [states transitions]})Validates machine spec. Throws on invalid spec.
Validates machine spec. Throws on invalid spec.
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 |