Re: can this be written more easily?

2003-02-22 Thread Dean Herington
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

Re: can this be written more easily?

2003-02-22 Thread Ken Shan
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

Re: can this be written more easily?

2003-02-21 Thread Mike T. Machenry
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 |