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 (p
ng to use a list comprehension to model this movement on
my graph. I want to build a list of all possible ways the players could move
on one particular turn. I have a function (outlets) that gives me the neighbors
of a node. This is a first draft function.
GameState = GameState Int Int Int In
Hello,
Hi,
I have a script here
interleave :: [Integer] -> [Strings] ->
[String]
interleave (x:xs) (y:ys)
= words [a | a <- (unwords
[(show x), (filter (/= 1) y), "+"])]
Firstly, "Strings" is not a standard type. I suspect
you mean "String" so the type signature is
interleave :: [In
> "Stephanie" == Stephanie Randles <[EMAIL PROTECTED]> writes:
Stephanie> Hi, I have a script here
Stephanie> interleave :: [Integer] -> [Strings] -> [String]
Stephanie> interleave (x:xs) (y:ys) = words [a | a <- (unwords
Stephanie> [(show x), (filter (/= 1) y), "+"])]
S
Hi,
I have a script here
interleave :: [Integer] -> [Strings]
-> [String]interleave (x:xs)
(y:ys) = words [a | a <-
(unwords [(show x), (filter (/= 1) y), "+"])]
and the error message i receive is
(Instance of Num Char required for definition of
interleave)
and I don't un