0
實施的‘河內塔’的問題,我得到了以下錯誤消息的代碼時
hanoi.hs:4:24: parse error on input `='
Failed, modules loaded: none.
下面是代碼:
hanoi 1 i j = [(i, j)]
hanoi n i j = hanoi n' i otherT ++ [(i,j)] ++ hanoi n' otherT j
where n' = n-1
otherT = 1+2+3-i-j
任何想法?
似乎你有混合標籤和空格。 –