[Haskell-beginners] Re: Understanding recursion in Haskell.

Will Ness will_n48 at yahoo.com
Wed Mar 18 11:47:34 EDT 2009


Zachary Turner <divisortheory <at> gmail.com> writes:

>  The entire chain of stuff that happens as a result of "the max of everything 
else", isn't important.  The important thing is that IF you have the first 
element, and IF you have the max of everything else, then the max of the whole 
list is the greater of those two items.  


IOW, to add a bit to your vivid description, a key to understanding recursion 
is learning to let go. It's zen, really. :)

It's learning to rely on the veracity of sub-results and just to combine them 
in a proper correctness-preserving fashion. It's about design by contract, and 
keeping invariants. 





More information about the Beginners mailing list