Re: can this be written more easily?

2003-02-21 Thread Mike T. Machenry
and array manipulation tend to alternate, `STArray`s in the `ST` monad might offer a more functional approach. If the amount of array manipulation is small, then the approach you've shown so far might be entirely adequate. Dean Mike T. Machenry wrote: I guess I figured that Arrays were

Random Color

2002-11-20 Thread Mike T. Machenry
I am trying to construct an infinate list of pairs of random colors. I am hung up on getting a random color. I have: data Color = Blue | Red | Green deriving (Eq, Ord, Show) am I supposed to instantiate a Random class instance from color? I am not sure exactly how the random number generator

Re: Random Color

2002-11-20 Thread Mike T. Machenry
wrote: G'day all. On Wed, Nov 20, 2002 at 08:44:36PM -0500, Mike T. Machenry wrote: I am trying to construct an infinate list of pairs of random colors. I am hung up on getting a random color. I have: data Color = Blue | Red | Green deriving (Eq, Ord, Show) am I supposed