Toying with an FSM implementation in OCaml