[plt-scheme] Re: HTDP Exercise 12.4.2 ... Help! (Solved!!)
Well put. I can only add one thing:
it's not just about recursion in the traditional sense.
It's also about building a large hierarchy where the top
level specs are clear, but as you start designing entirely
new layers (below the top) appear.
-- Matthias
On May 2, 2009, at 10:34 PM, S Brown wrote:
> I just wanted to update this topic in order to say that I have finally
> solved this exercise the *correct* way! Thank you very much to
> everyone here who provided input.
>
> For anyone who finds this topic and is looking for help with this
> exercise:
>
> 1. Learn the right way to think about recursion. Don't make the
> mistake I made and try to put the entire recursive process into your
> head all at once. It simply doesn't work. Even writing down all of the
> results of the recursion step-by-step won't help. Instead, use the
> definition of the function itself to understand how the recursion
> works, and then create the rest of the function as if the recursive
> call already does what it's supposed to do.
>
> 2. Follow the design recipes. This exercise is probably the first one
> in the book where you pretty much have to use the design recipes in
> order to find the right solution. The specific recipe you should be
> looking at here is in section 9.4
>
> 3. Walk away from this exercise if/when you get frustrated. Take a
> walk, watch a movie, etc. Basically, go do something that doesn't
> require a lot of thinking.
>
> 4. Don't give up on it until you have the solution. It's worth it once
> you solve it because you gain a better understanding of how to use and
> think about recursion, and how to use the design recipes.
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme