
10 Apr
2010
10 Apr
'10
10:11 a.m.
On 10/04/2010 13:57, Yves Parès wrote:
I answered my own question by reading this monad-prompt example: http://paste.lisp.org/display/53766
But one issue remains: those examples show how to make play EITHER a human or an AI. I don't see how to make a human player and an AI play SEQUENTIALLY (to a TicTacToe, for instance).
Make them polymorphic - the human player in any MonadIO, the AI player in any monad. Then run them both in the same monad, with some kind of wrapping function around the calls setting a context for the appropriate player. -- flippa@flippac.org