[Haskell-beginners] The (x:xs) in function parameter is a tuple?

Nan Xiao xiaonan830818 at gmail.com
Wed Feb 24 10:31:49 UTC 2016


Hi all,

Greetings from me!

I am confused about the function parameters and tuple. E.g.:

occurs value [] = 0
occurs value (x:xs) = (if value == x then 1 else 0) + occurs value xs

should we consider (x:xs) as a tuple?

Thanks in advance!

Best Regards
Nan Xiao


More information about the Beginners mailing list