Haskell Warning: Pattern match is redundant

前端 未结 0 786
忘了有多久
忘了有多久 2021-01-07 21:11

I have created a function in Haskell to counts the number of functions and operators in the given expression.

size :: Expr -> Int
size (Num n) = 1
size x           


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