[plt-scheme] critique of some code

From: Todd O'Bryan (toddobryan at gmail.com)
Date: Mon Dec 7 08:01:42 EST 2009

Well, it's good to finally know what the natural way to do this in
Scheme is. :-)

Point about the -1/#f problem well-taken, though.

Todd

On Mon, Dec 7, 2009 at 7:54 AM, Prabhakar Ragde <plragde at uwaterloo.ca> wrote:
> Matthias wrote:
>
>> You can also assign it to those of your students who understand
>> accumulators (which is what many loops require, but we let students
>> loose on for/do/while/repeat/rinse/one-more-time with nothing but
>> intuition).
>
> I would characterize the solution as structural recursion, since the
> accumulator is counting up towards a known bound. I know these categories
> are fuzzy at the edges, but my point is that I think this is a fair exercise
> in the "structural recursion on two values" part of an HtDP-based course. I
> often assign a similar question (using lists of symbols, and producing
> true/false instead of an index) at this point. --PR
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>


Posted on the users mailing list.