[plt-scheme] Reverse engineering of procedures

From: John Clements (clements at brinckerhoff.org)
Date: Mon Mar 14 10:49:06 EST 2005

On Mar 14, 2005, at 10:33 AM, Arie van Wingerden wrote:

>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> Hi Schemers,
> since some time I am working through 'The Little Schemer' using 
> DrScheme.
> Now I have reached the function multirember&co on page 137 and I am 
> kinda stuck; below is the code.


> What I cannot really grasp at the moment is what exactly the generated 
> function (col) will be upon the next call of multirember&co.
> To be precise, given the piece of code:
>      ((eq? (car lat) a)
>       (multirember&co a
>                       (cdr lat)
>                       (lambda (newlat seen)
>                         (col newlat (cons (car lat) seen)))))
> what is the form of the lambda afterwards (just before calling 
> multirember&co again?
> So I tried to find a way to debug.
> I already found out:
>    - the stepper does not work because lambda's are being used without 
> being a definition

Argh!  The stepper works _perfectly_ on this example.  Set the language 
level to "Intermediate with (lambda)."  I stepped through your code 
(well, Matthias' code actually) just fine (after removing that stray 
"print") in the stepper.

Please try again, and let me know if you have any problems.

John Clements

p.s.: my comments are based on DrScheme v209.  In earlier versions, the 
stepper may not work for Intermediate with (lambda).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2430 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20050314/c2932eaf/attachment.p7s>

Posted on the users mailing list.