Simon Thompson is an amazing teacher
After tripping and stumbling through "Gentle" and "YAHT", I am worlds grateful for "Craft of Functional Programming" He is not just teaching Haskell, he is teaching you how to think about problem solving.
The reason I am so excited is he gave the following exercise:
Give a function orderTriple which puts the elements of a triple of three integers into ascending order.
Ok, so far, just an ordinary question. And in most other cases that's all you would get. In YAHT, you would have copious exercises like what you just saw. In Gentle, he would show you the solution and keeping moving. It is the next sentence in this exercise that sets Thompson apart from the crowd:
You might like to use the maxThree, middle, and minThree functions defined earlier.
Kapow! After reading the first part of the exercise, my mind immediately began to scramble over how to maintain state and iterate through the elements, deleting them as I found their place.
But then Thompson *decomposed* the problem into 3 simpler problems for me!