Eli Ford [EMAIL PROTECTED] wrote:
Is there a better way than IORefs
The state Monad.
Do you mean one state shared among all actors, like this?
type MGame = State GameState
newtype GameState = GameState { shared state }
That gets part of the way, but I'm thinking of a
Eli Ford [EMAIL PROTECTED] wrote:
Is there a better way than IORefs
Without looking at the code: The state Monad. Imperative
implementations of games are usually[1] modelled as finite automata,
there's no reason to do it any different in a functional language. Add
a bit of glue to translate
Is there a better way than IORefs
The state Monad.
Do you mean one state shared among all actors, like this?
type MGame = State GameState
newtype GameState = GameState { shared state }
That gets part of the way, but I'm thinking of a situation where each
instance of a