Haskell how to count occurance of an element in a list recursively?

后端 未结 0 987
谎友^
谎友^ 2021-02-04 07:49

I\'m trying to recursively count how many times a given element (number) appears in a list.

For example, equals 2 [1,2,3,2,1,2,3] should return 3 for the num

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