这是我的代码
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
答案 0 :(得分: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)]
答案 1 :(得分:1)
您可以在do
和then
后尝试Monad(新的else
阻止)。