sumAllDigits :: [ Int ] -> Int
sumAllDigits (x:xs)
|(x:xs) == [] = 0
|x >= 10 = sumDigits x + sumAllDigits xs
|x< 10 = x + sumAllDigits xs
REPORT:
*遞歸> sumAllDigits [22,33] ***異常:Recursion.hs:(76,1) - (79,34):非窮盡在函數sumAllDigits非窮盡上的Haskell遞歸
'x:xs'如何能等於'[]'? (提示:以同樣的方式,1可以等於0.) – leftaroundabout