[racket] using Stepper in Intermediate with Lambda

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Tue May 13 08:32:44 EDT 2014

Add 

  (list-sum '(1 2 3) (lambda (x) x)) 

to the end of the definitions area and then step. 


On May 13, 2014, at 12:12 AM, Bohdan Krowicky wrote:

> Hi All,
> I’m studying the Little Schemer,( which is great, btw)  and got up to the Continuations section  and felt the need to do some searching for further elucidation (its tricky!), and came across this code
> (define (list-sum l k)
>   (if (null? l)
>     (k 0)
>     (list-sum (cdr l) (compose k (lambda (s) (+ s (car l)))))))
> from Eli Barzilay at http://stackoverflow.com/questions/2018008/help-understanding-continuations-in-scheme
> I like his suggestion to use the Stepper to examine the process in detail, but when I try it reports "All of the definitions have been successfully evaluated". I remember having a similar issue some time ago, in another context, but forget the fix…
> I’d be grateful for some guidance on this, and of how/when to best use the stepper
> Thanks in advance
> Bohdan
> ____________________
>  Racket Users list:
>  http://lists.racket-lang.org/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20140513/748de03f/attachment-0001.html>

Posted on the users mailing list.