# [plt-scheme] Using tables for recursive functions

 From: Todd O'Bryan (toddobryan at gmail.com) Date: Fri Feb 27 18:14:51 EST 2009 Previous message: [plt-scheme] Using tables for recursive functions Next message: [plt-scheme] syntax/loc for synthesized location data Messages sorted by: [date] [thread] [subject] [author]

```On Thu, Feb 26, 2009 at 4:53 PM, Stephen Bloch <sbloch at adelphi.edu> wrote:
>
> On Feb 26, 2009, at 4:27 PM, Inching Forward wrote:
>
>> In this plt-scheme message, Matthias mentions creating a table to
>> solve exercise 12.4.2:
>>
>> http://list.cs.brown.edu/pipermail/plt-scheme/2008-March/023863.html
>>
>> Has anyone written more on using tables like this?
>
> My draft textbook emphasizes the technique of "inventory with values", which
> is basically the same technique described in different words.  Oh, and the
> table is transposed :-)
>
> By the way, the technique isn't applicable only to recursive functions: it's
> useful in proportion to the complexity of the return type.  Symbols... not
> so much.  Numbers and strings... a little more useful.  Structs... even more
> useful.  Lists and trees... extremely useful.
>
> Stephen Bloch
> sbloch at adelphi.edu

After being reminded how important the functions to produce the
permutations of a list and power set of a set are in terms of
emphasizing the power of the Design Recipe, I created a series of
worksheets that consisted of function templates, test cases, and
tables similar to what Matthias and Stephen suggest.

They were incredibly helpful. Students who had tried really hard to
solve the problems suddenly "got it" (and got the importance of good
concrete examples to solving an abstract problem).

If anyone's interested, drop me a line off-list and I'll send the worksheets.

Todd

```

 Posted on the users mailing list. Previous message: [plt-scheme] Using tables for recursive functions Next message: [plt-scheme] syntax/loc for synthesized location data Messages sorted by: [date] [thread] [subject] [author]