So the various states are encapsulated in a go loop ? I always knew that 
core.async could be used to model FSM's. 

Well, if you can share the code somehow, do so. 

> Le 1 juin 2015 à 15:26, Herwig Hochleitner <hhochleit...@gmail.com> a écrit :
> 
> Wow, big thread.
> I just want to offer, how I've done a FSM implementation in CLJS:
> 
> - FSM edges are core.async channels
> - FSM state changes are represented by passing a token object (which can 
> contain additional state vars) across an edge channel
> - Each state is represented by a go-loop, with a single in-edge and multiple 
> out-edges
> - After being passed the token by its in-edge, a state runs, then passes the 
> token to one of its out-edges
> ​
> All said and done, this mainly exploits the excellent work on core.async and 
> core.match. Overall, it smells a lot like actors, only that the possible 
> messages are pre-determined.
> If you are interested, ping me for code.
> -- 
> Note that posts from new members are moderated - please be patient with your 
> first post.
> --- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "ClojureScript" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/clojurescript/7STtgK5QiIc/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> clojurescript+unsubscr...@googlegroups.com.
> To post to this group, send email to clojurescript@googlegroups.com.
> Visit this group at http://groups.google.com/group/clojurescript.

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to