How to represent a simple finite state machine in Ocaml?
问题 I have written some state machine in C++ and Java but never in a functional language like Ocaml Problem is I don't know if I can just adapt code from the object languages versions, since in Ocaml records and variants are more powerful than class; So, I need an event-driven finite state machine (hierarchical like in UML), easily configurable Could someone experienced in the field post a simple sample of that ? Just to avoid the most common traps thanks :) EDIT 16/03 : Is it possible to do it