1

这是我的代码

lotto blacklista size board current = [black | blacklista<-action current , warunki blacklista,
                                                if end current
                                                   then if check board blacklista
                                                   then black <- blacklista
                                                          else False
                                                else black <- lotto blacklista size board (next current) ]

你能告诉我为什么我在这一行得到解析错误吗?

then black <- blacklista
4

2 回答 2

1

从您提供的任何上下文来看,您似乎想要这样的东西:

lotto blacklista size board current = let blist = action current warunki blacklista in
                                          [black | black <- if end current && check board blist then blist
                                                            else lotto blacklista size board (next current)] 
于 2013-06-08T16:31:49.387 回答
1

您可以在and之后尝试 Monad(新do块)。thenelse

于 2013-06-08T20:54:59.763 回答