Liking cljdoc? Tell your friends :D

automata.fsm

Finite state transducer library. Intended for data representations of state transitions, leaving actions to consumers of the library.

Finite state transducer library. Intended for data representations of
state transitions, leaving actions to consumers of the library.
raw docstring

invalid-statesclj/s

(invalid-states rules)

Returns a collection of invalid target states used in

Predicate to check whether a given valid ruleset provides a functioning set of rules. Rules are deemed functioning if all target states are known.

Returns a collection of invalid target states used in

Predicate to check whether a given valid ruleset provides
 a functioning set of rules. Rules are deemed functioning if
 all target states are known.
sourceraw docstring

transitclj/s

(transit {:automata.fsm/keys [rules state] :as machine} event)
(transit rules state event)

Given a set of rules for states, a current state and event, figure out the next state and potential side effects to perform.

Transit can either be called on a machine, i.e: a map containing the current state and rules. In this case, an updated machine map will be returned, with a potentially new state and potential actions to perform if any.

When called with the three-arity version, transition rules, state, and event are provided separately. The output is then a transition.

Both arities throw when no possible transition was found

Given a set of rules for states, a current state and event,
figure out the next state and potential side effects to perform.

Transit can either be called on a *machine*, i.e: a map containing
the current state and rules. In this case, an updated machine map
will be returned, with a potentially new state and potential actions
to perform if any.

When called with the three-arity version, transition rules, state,
and event are provided separately. The output is then a transition.

Both arities throw when no possible transition was found
sourceraw docstring

validate-rulesclj/s

(validate-rules rules)

Perform sanity checks on a rule set, intended to be ran when loading rules. Throws on badly formulated rules

Perform sanity checks on a rule set, intended to be ran when loading rules.
Throws on badly formulated rules
sourceraw docstring

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

× close