[plt-scheme] HTDP: 9.5.5

From: Grant Rettke (grettke at acm.org)
Date: Sun Sep 14 21:01:33 EDT 2008

> Grant: When we teach this stuff, we ask three template questions at this
> stage (how many clauses in the DD and what do they distinguish; are any of
> them structures, extract the fields; do you see self-references, that's
> where you indicate recursion) and then we give three hints for coding:
>  -- start with the case(s) that don't use recursion; the examples should
> tell you how to compute the result there

Understood. The base cases are the starting point, and the recipe
takes you here.

>  -- then remind yourself what each subexpression in the remaining clauses
> computes

That is what I *didn't* do.

>  -- find a "combinator" that uses just those values and produces the proper
> result.

I see that (fun (rest a-list-of-something)) is whatever the value for
the base condition, and that is how to start figuring out how to
replace the template with a combinator (?) that takes you where you
want to go.

Posted on the users mailing list.