> 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
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to