[plt-scheme] CPS and state machines

From: Joel Reymont (joelr at well.com)
Date: Mon Dec 6 07:12:45 EST 2004

Would anyone have an example of implementing a state machine in
continuation passing style (CPS)? I'm looking for a simple example
although it does not have to be.

I'd like to implement a state machine for a game lobby where on receipt
of event-1 I would send game summaries, on event-2 player summaries, etc.
I will then build on this example to implement a poker logic state machine. 

In the game logic fsm there are events like player-joined and player-left
and where the game would end when there are not enough players or begin
when enough players joined and where it would otherwise state in the same

    Thanks, Joel

OpenPoker: The Linux of poker software

Posted on the users mailing list.