News for hackers. Stuff that matters.
Re:Why developers should be force-fed state machines by rdtsc on Monday June 13, 2011 @12:14PM (#2649560)
Erlang comes with gen_fsm behavior because often when writting network protocols and servers, a state machine is a useful abstraction.

Relevant:

"Rage Against The Finite-State Machine" from "Learn you some Erlang For Great Good"

http://learnyousomeerlang.com/finite-state-machines

Re:Why developers should be force-fed state machines by teaspoon on Monday June 13, 2011 @12:37PM (#2649652)
In Haskell, you can represent a state machine and its current state using an iteratee:

http://www.yesodweb.com/blog/2010/09/enumerators-tutorial-pa...

An iteratee is essentially just a function that takes an input symbol and returns either a final state value or another iteratee.