2
我收到以下錯誤:Haskell在輸入'|'時解析錯誤
parse error on input '|'
我的代碼:
makeMove :: Player -> Board -> Maybe Board
makeMove p b | hasWinner b == Nothing = getMove p rb ri
where rb = gameTree p b
ri = minimax p rb
ros2int (i' :> ri') = i'
rb2b (b':rbs') = b
getMove p (r:rs) (i:is) = let bs = map rb2b rs
is = map ros2int is
idx = elemIndex (maximum' is) is
res (Nothing) = Nothing
res (Just x) = Just ((bs)!!x)
in res idx
| otherwise = Nothing
不過,我想這會通過標籤的干擾通常可以引起的,但我檢查,我只用了空間,使couldn不是問題。任何人都可以幫我解決這個問題嗎?
在此先感謝!
此致敬禮, Skyfe。
那做的工作!謝謝! – user2999349 2014-09-26 14:08:15