哈斯克尔; _ [] = ...不匹配(2,1)[]

0 haskell pattern-matching

combineb :: (Integer,Integer) -> [Integer] -> Integer
comnineb _ [] = 0
combineb x (l:ls) = l + (combineb x ls)
Run Code Online (Sandbox Code Playgroud)

程序错误:模式匹配失败:combineb(2,1)[]

你能帮帮我吗,为什么不[_]匹配(2,1)[]?

顺便说一句.我知道我实际上从未在这个功能中使用过第一个Paremter ......

Chr*_*lor 5

你有一个拼写错误 - comnineb而不是combineb你的程序的第二行.