Non-exhaustive patterns in function len

后端 未结 0 1567
耶瑟儿~
耶瑟儿~ 2021-01-13 15:07

I\'m writing this function len which calculates the length of a list in GHCi.

len [] = 0
len [x] = 1
len (x:xs) = 1 + len xs

I tried to call

相关标签:
回答
  • 消灭零回复
提交回复
热议问题