Re: need help with list comprehension

2003-02-16 Thread Arjan van IJzendoorn
Hi Mike, GameState = GameState Int Int Int Int Int movePlayers :: GameState - [GameState] movePlayers (GameState p1 p2 p3 p4 p5) = [ (GameState p1' p2' p3' p4' p5') | p1' - outlets (p1), p2' - outlets (p2), p3' - outlets (p3), p4' - outlets (p4),

type classes vs. multiple data constructors

2003-02-16 Thread Mike T. Machenry
I have a type that is as follows: data PlayerState = FugitiveState { tickets :: Array Ticket Int, fHistory :: [Ticket] } | DetectiveState { tickets :: Array Ticket Int, dHistory :: [Stop] } I have a few functions that act on PlayerState. move :: PlayerState -

Re: big rationals question

2003-02-16 Thread Ferenc Wagner
Damien R. Sullivan [EMAIL PROTECTED] writes: can I get Haskell to actually do that division itself? You can use the function fromRational :: Fractional a = Rational - a Feri. ___ Haskell-Cafe mailing list [EMAIL