example usage in test_fsm.ml. to build: ocamlbuild -use-ocamlfind test_fsm.native -classic-display
declarative FSMs in OCaml