[Haskell-cafe] Recursion in Haskell

P. R. Stanley prstanley at ntlworld.com
Sat Feb 17 21:32:58 EST 2007

I understand the basic principle of recursion but have difficulty 
with the following:
-- a recursive function
-- for calculating the length of lists
myLen [] = 0
myLen (x:xs) = 1 + myLen xs
What's happening here?
Top marks for a comprehensive jargon-free explanation.
Thanks in advance

More information about the Haskell-Cafe mailing list