Open ikitommi opened 2 years ago
I can see the rationale, but atm I myself doesn't have a use case for that. So patches welcome.
Some considerations:
Thanks. I added this into my preprocessor for clj-statecharts, I can now enrich and precompute things I need, so not in an urgent need of this now at library level. If you want to close this, ok for me. Happy to do a PR at some point, when needs and impls have setteled. Cheers.
e.g. have a protocol to both hide the impl and add missing things. Not doing much yet and not sure where it evolves from here.
(defprotocol FSM
(-id [this])
(-initial [this])
(-states [this])
(-next [this state])
(-form [this])
XState has an api to ask which signals are allowed given the current state:
This is really important as this information can be used to enable/disable & hide/show action buttons on uis based on their current availability.
I propose clj-statecharts to have a function of
machine state -> State
, e.g.