
30 Nov
2009
30 Nov
'09
4:56 p.m.
There's a nice approach to this problem which is described and implemented in the MonadPrompt package[1].
Thanks a lot for this link. The "guessing game" example linked to from the documentation is still very hard to understand (I'm still struggling with monads), but it seems to fill my needs. Still more importantly to me, I understand that anyhow if I intend to use IO or random numbers, I must design my strategy from the beginning as "encapsulated in a monad". Something like: class (Monad m) => Strategy m a where ... Cheers, Eric