[plt-scheme] On continuations...

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Fri Dec 17 18:37:46 EST 2004

On Dec 17, 2004, at 5:48 PM, Matthias Felleisen wrote:

>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
> John, I think michael wants macros so that
>
> (def part (n)
>      (if (= n 0)

apologies: this should be when. -- Matthias


>          (yield empty)
>          (return #f))
>      (for-each-yield part (- n 1)
>                      (lambda (p)
>                        (yield (cons 1 p))
>                        (if (and (pair? p) (or (null? (cdr p)) (< (car 
> p) (cadr p))))
>                            (yield (cons (+ 1 (car sp)) (cdr sp)))))))
>
> works. Daniel? -- Matthias
>
> P.S. The macros are left as an exercise to the reader. Hint: use 
> syntax-case.



Posted on the users mailing list.