Haskell non exhaustive patterns in function

前端 未结 3 1292
粉色の甜心
粉色の甜心 2020-12-20 17:42

the following code compiles well but when i try to input helper 10 primes [] [] it gives me :Non-exhaustive patterns in function helper

primes = [2, 3, 5, 7,         


        
3条回答
  •  孤城傲影
    2020-12-20 17:48

    chinese3 has no case for the empty list.

    helper lacks several more cases, including one where the second argument has one element.

提交回复
热议问题