Okay. It's very usual in finite state machine implementations to use `switch` depending on the current state, so what do you propose? `if`/`else if`s or a bunch of anonymous functions mapped to state names?