18 Mar
2009
18 Mar
'09
3:47 p.m.
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.