No, I am not making it up. This is a section about trees. A Tree structured datatype is great for...um...well actually I do not know of any examples it is good for other than something like a family tree, so here it goes.
Defining a Tree of Integers is done as below.
Once again you can see that this datatype uses recursion in its definition. The example of the TreeNode datatype represented graphically would have 1986 at the top with two nodes coming off it (1959 and 1953) which both would have leaves coming off them. Not too clear, but clearer when you draw it out for yourself!
A nice example of something neat you can do with Trees is finding its depth.
You can also do other funky things like finding the sum of all the elements in a tree using a similar layout.
Once again, this is another function that uses recursion to achieve its goal! sumTree calls sumTree and so on until sumTree hits a Leaf when it returns 0 instead.
Lists can be a real pain to debug and hugs, as was noted earlier, does not allow you as a programmer to step through and see where things are going wrong.