State Machines and the Strange Case of Mutating API — LessWrong