Three implementations:
demo_switch.cmost basic, switch-based state machinedemo_functions.ca little nicer on the eye with functions as state handlersdemo_functions_results.ca more generic state machine framework with reconfigurable state transitions