Ah, I see. Finite maps might be appropriate, then. Here's a sketch of
how you might implement arraylike objects with finite maps.
-- Array-like objects built from FiniteMaps
-- Dean Herington, Feb. 22, 2003
module FMArray (FMArray, fmArray, get, set, update) where
import Array
import
On 2003-02-21T13:37:26-0500, Mike T. Machenry wrote:
Eh, state is not possible. This is a recursive state space search. I need
to branch the state of the game and not allow branches to effect others.
I see-- so you don't care about performing array updates in place,
because you will be copying
Eh, state is not possible. This is a recursive state space search. I need
to branch the state of the game and not allow branches to effect others.
Though I'd really like to represent them as arrays like such:
data Player = Red | Green | Blue deriving (Enum,Eq,Ix)
data Ticket = Taxi | Bus |