Reactive state machine with Bacon